Results 1 to 3 of 3

Thread: Spring-Batch-Admin problem in XML namespace handler

  1. #1

    Default Spring-Batch-Admin problem in XML namespace handler

    Hi all,

    I've decided to tryout the Spring Batch for some project that I am currently on.

    I've downloaded PDF's both for Spring-Batch and Spring-Batch-Admin. Also downloaded distributions from SpringSource.

    I've started new Maven project and currently I'm interested in developing something like spring-batch-admin application,
    that will be deployed to Tomcat as war file where I can see execution status of some defined jobs.

    At least that is what I want. Now I am looking at sample in spring-batch-admin and I am having following problem.


    I've added Maven dependency:

    Code:
    <dependency>
       <groupId>org.springframework.batch</groupId>
       <artifactId>spring-batch-admin-manager</artifactId>
       <version>1.0.0.RELEASE</version>
    </dependency>
    That gave me a whole bunch of transitive dependencies to other spring and spring-batch JAR's.

    In my web.xml I've added:
    Code:
      <context-param>
      	<param-name>contextConfigLocation</param-name>
      	<param-value>classpath*:/org/springframework/batch/admin/web/resources/webapp-config.xml</param-value>  	
      </context-param>
    But then again, now when I startup Tomcat, I am getting following error:

    Code:
    Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/task]

    It seams that there is no such namespace defined anymore?

    Can someone give me a hint how can I overcome this problem ?


    As addition I've included logback and here lies the problem:
    Code:
    10:42:24.598 [main] ERROR o.s.web.context.ContextLoader (org.springframework.web.context.ContextLoader:215) - Context initialization failed
    org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath*:/META-INF/spring/batch/bootstrap/**/*.xml]
    Offending resource: URL [jar:file:/D:/Work_Home/Java/spring_batch/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/spring-batch-tutorial/WEB-INF/lib/spring-batch-admin-resources-1.0.0.RELEASE.jar!/org/springframework/batch/admin/web/resources/webapp-config.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/task]
    Offending resource: URL [jar:file:/D:/Work_Home/Java/spring_batch/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/spring-batch-tutorial/WEB-INF/lib/spring-batch-admin-manager-1.0.0.RELEASE.jar!/META-INF/spring/batch/bootstrap/manager/execution-context.xml]
    
    	at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68) ~[spring-beans-2.5.6.jar:2.5.6] ....
    Last edited by staleks; Nov 24th, 2010 at 03:50 AM.
    Aleksandar Stoisavljevic M.Sc
    http://www.staleksit.in.rs

  2. #2

    Default Maybe I've managed to isolate problem ?

    Hi,

    as update on this issue, I've start to look which namespace handlers I have in project using spring. So I have found in spring-beans-2.5.6.jar /META-INF/spring.schemas and /META-INF/spring.handlers

    Here is that part:

    spring.schemas
    Code:
    http\://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd
    http\://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd
    http\://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd
    http\://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd
    http\://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd
    http\://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd
    http\://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd
    http\://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd
    http\://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd
    and

    spring.handlers
    Code:
    http\://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler
    http\://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler
    So I am wondering where is namespace handler for task defined? Maybe I am missing this spring module as Maven dependency?

    Can anyone help me with this ?
    Aleksandar Stoisavljevic M.Sc
    http://www.staleksit.in.rs

  3. #3

    Default spring-admin-manager is missing spring-context

    Hi,

    I've found where task namespace handler resides

    I've added spring-context and finally get this example moving from "dead point".
    Aleksandar Stoisavljevic M.Sc
    http://www.staleksit.in.rs

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •