mdindagur
Nov 28th, 2007, 03:32 PM
Hi,
I'm trying to run the sample jobs obtained from source at http://springframework.svn.sourceforge.net/svnroot/springframework/spring-batch/trunk/. Initially I downloaded the framework along with samples; Using maven and jdk 1.5 I was able to compile, run the associated tests with HSQLDB(default). I was still getting exceptions trying to update the in-memory database. Since I need to implement my application using Oracle 10g, I thought of using oracle to see how the samples work. I modified the following to point to oracle database.
\samples\src\main\resources\batch.properties .
\execution\src\main\resources\batch.template.prope rties
\samples\src\main\resources\data-source-context-init.xml
corrected the dialect in \samples\src\main\resources\hibernate-context.xml to point to oracle
\execution\src\main\resources\schema-oracle10g.sql
I am getting the exception listed below.
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jobLauncher' defined in class path resource [simple-container-definition.xml]: Cannot resolve reference to bean 'simpleJobRepository' while setting bean property 'jobRepository'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'simpleJobRepository' defined in class path resource [simple-container-definition.xml]: Cannot resolve reference to bean 'sqlJobDao' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sqlJobDao' defined in class path resource [simple-container-definition.xml]: Cannot resolve reference to bean 'jobIncrementer' while setting bean property 'jobIncrementer'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jobIncrementer' defined in class path resource [data-source-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException : Invalid property 'columnName' of bean class [org.springframework.jdbc.support.incrementer.Oracl eSequenceMaxValueIncrementer]: No property 'columnName' found
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:274)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:104)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1274)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:1042)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:485)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 51)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:169)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:170)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.getBeansOfType(DefaultListableB eanFactory.java:296)
at org.springframework.context.support.AbstractApplic ationContext.getBeansOfType(AbstractApplicationCon text.java:950)
at org.springframework.context.support.AbstractApplic ationContext.registerListeners(AbstractApplication Context.java:711)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:366)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationContext.java:122)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationContext.java:66)
at org.springframework.batch.sample.AbstractBatchLaun cherTests.createApplicationContext(AbstractBatchLa uncherTests.java:53)
at org.springframework.test.AbstractSingleSpringConte xtTests.loadContextLocations(AbstractSingleSpringC ontextTests.java:212)
at org.springframework.test.AbstractSingleSpringConte xtTests.loadContext(AbstractSingleSpringContextTes ts.java:187)
at org.springframework.test.AbstractSpringContextTest s.getContext(AbstractSpringContextTests.java:140)
at org.springframework.test.AbstractSingleSpringConte xtTests.setUp(AbstractSingleSpringContextTests.jav a:100)
at junit.framework.TestCase.runBare(TestCase.java:132 )
at org.springframework.test.ConditionalTestCase.runBa re(ConditionalTestCase.java:76)
at junit.framework.TestResult$1.protect(TestResult.ja va:110)
at junit.framework.TestResult.runProtected(TestResult .java:128)
at junit.framework.TestResult.run(TestResult.java:113 )
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:2 32)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:186)
Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'simpleJobRepository' defined in class path resource [simple-container-definition.xml]: Cannot resolve reference to bean 'sqlJobDao' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sqlJobDao' defined in class path resource [simple-container-definition.xml]: Cannot resolve reference to bean 'jobIncrementer' while setting bean property 'jobIncrementer'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jobIncrementer' defined in class path resource [data-source-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException : Invalid property 'columnName' of bean class [org.springframework.jdbc.support.incrementer.Oracl eSequenceMaxValueIncrementer]: No property 'columnName' found
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:274)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:104)
at org.springframework.beans.factory.support.Construc torResolver.resolveConstructorArguments(Constructo rResolver.java:447)
at org.springframework.beans.factory.support.Construc torResolver.autowireConstructor(ConstructorResolve r.java:148)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.autowireConstructor(Abs tractAutowireCapableBeanFactory.java:957)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:869)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:514)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:485)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 51)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:169)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:170)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:268)
... 33 more
Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sqlJobDao' defined in class path resource [simple-container-definition.xml]: Cannot resolve reference to bean 'jobIncrementer' while setting bean property 'jobIncrementer'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jobIncrementer' defined in class path resource [data-source-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException : Invalid property 'columnName' of bean class
... 47 more
Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jobIncrementer' defined in class path resource [data-source-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException : Invalid property 'columnName' of bean class
... 59 more
Caused by: org.springframework.beans.InvalidPropertyException : Invalid property 'columnName' of bean class
... 67 more
Has anyone tried testing the samples in Oracle? Can you guide me on where the problem lies, or I have missed anything in the process? Couldn't find much help in the forum and the web, and hence this post.
Thanks,
-Mahesh
I'm trying to run the sample jobs obtained from source at http://springframework.svn.sourceforge.net/svnroot/springframework/spring-batch/trunk/. Initially I downloaded the framework along with samples; Using maven and jdk 1.5 I was able to compile, run the associated tests with HSQLDB(default). I was still getting exceptions trying to update the in-memory database. Since I need to implement my application using Oracle 10g, I thought of using oracle to see how the samples work. I modified the following to point to oracle database.
\samples\src\main\resources\batch.properties .
\execution\src\main\resources\batch.template.prope rties
\samples\src\main\resources\data-source-context-init.xml
corrected the dialect in \samples\src\main\resources\hibernate-context.xml to point to oracle
\execution\src\main\resources\schema-oracle10g.sql
I am getting the exception listed below.
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jobLauncher' defined in class path resource [simple-container-definition.xml]: Cannot resolve reference to bean 'simpleJobRepository' while setting bean property 'jobRepository'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'simpleJobRepository' defined in class path resource [simple-container-definition.xml]: Cannot resolve reference to bean 'sqlJobDao' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sqlJobDao' defined in class path resource [simple-container-definition.xml]: Cannot resolve reference to bean 'jobIncrementer' while setting bean property 'jobIncrementer'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jobIncrementer' defined in class path resource [data-source-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException : Invalid property 'columnName' of bean class [org.springframework.jdbc.support.incrementer.Oracl eSequenceMaxValueIncrementer]: No property 'columnName' found
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:274)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:104)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1274)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:1042)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:485)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 51)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:169)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:170)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.getBeansOfType(DefaultListableB eanFactory.java:296)
at org.springframework.context.support.AbstractApplic ationContext.getBeansOfType(AbstractApplicationCon text.java:950)
at org.springframework.context.support.AbstractApplic ationContext.registerListeners(AbstractApplication Context.java:711)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:366)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationContext.java:122)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationContext.java:66)
at org.springframework.batch.sample.AbstractBatchLaun cherTests.createApplicationContext(AbstractBatchLa uncherTests.java:53)
at org.springframework.test.AbstractSingleSpringConte xtTests.loadContextLocations(AbstractSingleSpringC ontextTests.java:212)
at org.springframework.test.AbstractSingleSpringConte xtTests.loadContext(AbstractSingleSpringContextTes ts.java:187)
at org.springframework.test.AbstractSpringContextTest s.getContext(AbstractSpringContextTests.java:140)
at org.springframework.test.AbstractSingleSpringConte xtTests.setUp(AbstractSingleSpringContextTests.jav a:100)
at junit.framework.TestCase.runBare(TestCase.java:132 )
at org.springframework.test.ConditionalTestCase.runBa re(ConditionalTestCase.java:76)
at junit.framework.TestResult$1.protect(TestResult.ja va:110)
at junit.framework.TestResult.runProtected(TestResult .java:128)
at junit.framework.TestResult.run(TestResult.java:113 )
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:2 32)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:186)
Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'simpleJobRepository' defined in class path resource [simple-container-definition.xml]: Cannot resolve reference to bean 'sqlJobDao' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sqlJobDao' defined in class path resource [simple-container-definition.xml]: Cannot resolve reference to bean 'jobIncrementer' while setting bean property 'jobIncrementer'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jobIncrementer' defined in class path resource [data-source-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException : Invalid property 'columnName' of bean class [org.springframework.jdbc.support.incrementer.Oracl eSequenceMaxValueIncrementer]: No property 'columnName' found
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:274)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:104)
at org.springframework.beans.factory.support.Construc torResolver.resolveConstructorArguments(Constructo rResolver.java:447)
at org.springframework.beans.factory.support.Construc torResolver.autowireConstructor(ConstructorResolve r.java:148)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.autowireConstructor(Abs tractAutowireCapableBeanFactory.java:957)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:869)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:514)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:485)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 51)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:169)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:170)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:268)
... 33 more
Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sqlJobDao' defined in class path resource [simple-container-definition.xml]: Cannot resolve reference to bean 'jobIncrementer' while setting bean property 'jobIncrementer'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jobIncrementer' defined in class path resource [data-source-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException : Invalid property 'columnName' of bean class
... 47 more
Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jobIncrementer' defined in class path resource [data-source-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException : Invalid property 'columnName' of bean class
... 59 more
Caused by: org.springframework.beans.InvalidPropertyException : Invalid property 'columnName' of bean class
... 67 more
Has anyone tried testing the samples in Oracle? Can you guide me on where the problem lies, or I have missed anything in the process? Couldn't find much help in the forum and the web, and hence this post.
Thanks,
-Mahesh