Results 1 to 8 of 8

Thread: using spring batch admin

Hybrid View

  1. #1

    Question using spring batch admin

    Hi
    I am trying to customize spring batch admin and following the steps listed http://static.springsource.org/sprin...g-started.html have connected to my backend postgres database which is hosting my batch job data.
    However i am having trouble getting the view to work . All my spring dependencies in the pom are set to 3.0.5 release and using the specific dependency as in the spring-batch-admin-manager (template) project is as
    Code:
    	
                      <dependency>
    			<groupId>org.freemarker</groupId>
    			<artifactId>freemarker</artifactId>
    		</dependency>
    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'annotationMappingMetaData': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping org.springframework.batch.admin.web.util.AnnotationMappingMetaData.mapping; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultAnnotationHandlerMapping' defined in URL [jar:file:/C:/gwt/sts/tc-server-developer-2.1.1.RELEASE/spring-insight-instance/wtpwebapps/spring-batch-admin-example/WEB-INF/lib/spring-batch-admin-resources-1.0.0.M1.jar!/META-INF/servlet/freemarker-servlet.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchFieldError: USER_DECLARED_METHODS
    	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:283)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1055)
    	at 
    ...
    Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping org.springframework.batch.admin.web.util.AnnotationMappingMetaData.mapping; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultAnnotationHandlerMapping' defined in URL [jar:file:/C:/gwt/sts/tc-server-developer-2.1.1.RELEASE/spring-insight-instance/wtpwebapps/spring-batch-admin-example/WEB-INF/lib/spring-batch-admin-resources-1.0.0.M1.jar!/META-INF/servlet/freemarker-servlet.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchFieldError: USER_DECLARED_METHODS
    	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:504)
    	at 
    ....
    Caused by: java.lang.NoSuchFieldError: USER_DECLARED_METHODS
    	at org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping.determineUrlsForHandlerMethods(DefaultAnnotationHandlerMapping.java:191)
    	at

  2. #2

    Default

    So i checked the freemarker-servlet.xml located in spring-batch-admin-resources-1.0.0.M1.jar in the spring-batch-admin-example and the namespace contains a reference to the spring 2.5 xsd's. is that the problem ?
    If i try to override that particular bean "defaultAnnotationHandlerMapping" in my own config i see that in the 3.0.5 release the DefaultAnnotationHandlerMapping class from o.s.web.servlet.mvc does not have interceptor property.

    How to make spring-batch-admin work in 3.0.5 ?

  3. #3
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    Quote Originally Posted by anshumania View Post
    How to make spring-batch-admin work in 3.0.5 ?
    Use the latest release (1.2.0.RELEASE), and not an old milestone?

  4. #4

    Default

    Thanks. Atleast that got me started and by now i have been able to integrate successfully with spring integration and launch jobs as well using stringtojoblaunchrequest adapter and joblaunchmessaging handler.
    Also I can lauch jobs from spring batch-admin ui. Great tool ! thanks !

  5. #5
    Join Date
    Jun 2011
    Posts
    9

    Default

    hey anshumania..

    Could you plz guide me fr how batch admin is to be connected to database? coz I m trying the same by following the steps given in ref doc..but no go..
    I have deployed the spirng batch admin war on tomcat and hv configured the xml by overriding few elements as given in the doc.
    Wat else we need to do to make it work?

    thx in adv...

  6. #6

    Default

    what is the error you are getting ? make sure ur datasource is loaded.
    You have to override as per the docs + u will need to append the prefix for your database in the configuration, if any.

    Quote Originally Posted by amrudhta View Post
    hey anshumania..

    Could you plz guide me fr how batch admin is to be connected to database? coz I m trying the same by following the steps given in ref doc..but no go..
    I have deployed the spirng batch admin war on tomcat and hv configured the xml by overriding few elements as given in the doc.
    Wat else we need to do to make it work?

    thx in adv...

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
  •