Results 1 to 2 of 2

Thread: CommandLineJobRunner Exception

  1. #1
    Join Date
    Jun 2009
    Posts
    6

    Default CommandLineJobRunner Exception

    Hi All,

    I get the following exception (pasted below) when I try to execute my jobs via the CommandLineJobRunner. They run fine from a unit test. I've googled and searched the forum but have not found anything useful. Poms and context configuration file are attached.

    Anyone have any thoughts?

    Thanks,

    Ed

    2010-03-25 10:30:52,953 INFO [org.springframework.context.support.ClassPathXmlAp plicationContext] - <Refreshing org.springframework.context.support.ClassPathXmlAp plicationContext@136228: display name [org.springframework.context.support.ClassPathXmlAp plicationContext@136228]; startup date [Thu Mar 25 10:30:52 EDT 2010]; root of context hierarchy>
    2010-03-25 10:30:53,031 INFO [org.springframework.beans.factory.xml.XmlBeanDefin itionReader] - <Loading XML bean definitions from class path resource [batchApplicationContext.xml]>
    2010-03-25 10:30:53,765 INFO [org.springframework.beans.factory.support.DefaultL istableBeanFactory] - <Overriding bean definition for bean 'ycpsExport': replacing [Generic bean: class [org.springframework.batch.core.configuration.xml.S impleFlowFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Generic bean: class [org.springframework.batch.core.configuration.xml.J obParserJobFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]>
    2010-03-25 10:30:53,765 INFO [org.springframework.beans.factory.support.DefaultL istableBeanFactory] - <Overriding bean definition for bean 'bannerExport': replacing [Generic bean: class [org.springframework.batch.core.configuration.xml.S impleFlowFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Generic bean: class [org.springframework.batch.core.configuration.xml.J obParserJobFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]>
    2010-03-25 10:30:53,781 INFO [org.springframework.context.support.ClassPathXmlAp plicationContext] - <Bean factory for application context [org.springframework.context.support.ClassPathXmlAp plicationContext@136228]: org.springframework.beans.factory.support.DefaultL istableBeanFactory@182da3d>
    2010-03-25 10:30:53,906 INFO [org.springframework.beans.factory.config.PropertyP laceholderConfigurer] - <Loading properties file from class path resource [datasource.properties]>
    2010-03-25 10:30:53,937 INFO [org.springframework.beans.factory.support.DefaultL istableBeanFactory] - <Overriding bean definition for bean 'ycpsExportProgramItemReader': replacing [Generic bean: class [edu.yale.sfas.cimp.batch.YcpsExportProgramItemRead er]; scope=step; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=false; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [batchApplicationContext.xml]] with [Root bean: class [org.springframework.aop.scope.ScopedProxyFactoryBe an]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in BeanDefinition defined in class path resource [batchApplicationContext.xml]]>
    2010-03-25 10:30:54,265 INFO [org.springframework.beans.factory.support.DefaultL istableBeanFactory] - <Overriding bean definition for bean 'bannerExportOfferingItemReader': replacing [Generic bean: class [edu.yale.sfas.cimp.batch.BannerExportOfferingItemR eader]; scope=step; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=false; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [batchApplicationContext.xml]] with [Root bean: class [org.springframework.aop.scope.ScopedProxyFactoryBe an]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in BeanDefinition defined in class path resource [batchApplicationContext.xml]]>
    2010-03-25 10:30:54,265 INFO [org.springframework.beans.factory.support.DefaultL istableBeanFactory] - <Overriding bean definition for bean 'bannerExportStagedOfferingItemReader': replacing [Generic bean: class [edu.yale.sfas.cimp.batch.BannerExportStagedOfferin gItemReader]; scope=step; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=false; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [batchApplicationContext.xml]] with [Root bean: class [org.springframework.aop.scope.ScopedProxyFactoryBe an]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in BeanDefinition defined in class path resource [batchApplicationContext.xml]]>
    2010-03-25 10:30:54,328 INFO [org.springframework.beans.factory.support.DefaultL istableBeanFactory] - <Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@182da3d: defining beans [org.springframework.context.annotation.internalCom monAnnotationProcessor,org.springframework.context .annotation.internalAutowiredAnnotationProcessor,o rg.springframework.context.annotation.internalRequ iredAnnotationProcessor,sessionFactory,bannerCrnDa taSourceSessionFactory,transactionManager,taggingI nterceptor,org.springframework.batch.core.scope.in ternalStepScope,org.springframework.beans.factory. config.CustomEditorConfigurer,org.springframework. batch.core.configuration.xml.CoreNamespacePostProc essor,ycpsExportStage1,ycpsExportStage2,ycpsExport ,bannerExportStage1,bannerExportStage2,bannerExpor tStage3,bannerExport,jobRepository,markExistingRec ordsAsDeleted,deleteAllYcpsExportRecords,ycpsExpor tProgramItemReader,ycpsExportProgramItemProcessor, ycpsExportProgramOfferingItemWriter,bannerExportOf feringItemReader,bannerExportOfferingItemProcessor ,bannerExportOfferingItemWriter,bannerExportStaged OfferingItemReader,bannerExportStagedOfferingItemP rocessor,bannerExportStagedOfferingItemWriter,prog ramDao,offeringDao,ldapPersonDao,ycpsExportOfferin gDao,ycpsExportProgramDao,ycpsExportSubheadDao,ban nerExportOfferingDao,bannerExportSectionDao,banner Dao,stepDefaults,jobLauncher,ldapContextSource,lda pTemplate,dataSource,bannerCrnDataSource,placehold erProperties,scopedTarget.ycpsExportProgramItemRea der,scopedTarget.bannerExportOfferingItemReader,sc opedTarget.bannerExportStagedOfferingItemReader]; root of factory hierarchy>
    2010-03-25 10:30:54,781 ERROR [org.springframework.batch.core.launch.support.Comm andLineJobRunner] - <Job Terminated in error: org.springframework.beans.factory.annotation.Injec tionMetadata.<init>(Ljava/lang/ClassV>
    java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.Injec tionMetadata.<init>(Ljava/lang/ClassV
    at org.springframework.context.annotation.CommonAnnot ationBeanPostProcessor.findResourceMetadata(Common AnnotationBeanPostProcessor.java:318)
    at org.springframework.context.annotation.CommonAnnot ationBeanPostProcessor.postProcessMergedBeanDefini tion(CommonAnnotationBeanPostProcessor.java:277)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyMergedBeanDefiniti onPostProcessors(AbstractAutowireCapableBeanFactor y.java:789)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:487)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:450)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 90)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:287 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:189)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:545)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:728)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:380)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:139)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:83)
    at org.springframework.batch.core.launch.support.Comm andLineJobRunner.start(CommandLineJobRunner.java:2 57)
    at org.springframework.batch.core.launch.support.Comm andLineJobRunner.main(CommandLineJobRunner.java:46 4)
    Attached Files Attached Files

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    Use supported versions together and don't mix different versions of spring jars or spring module jars. My guess is that the latter is the case.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

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