org.springframework.beans.factory.BeanCreationException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • This late binding worked in 2.0.4 but not in the latest 2.1 milestone: {code} <bean id="flatFileItemReader" class="org.springframework.batch.item.file.FlatFileItemReader" scope="step"> <property name="strict" value="false" /> <property name="resource"> <bean class="org.springframework.core.io.UrlResource" scope="step"> <constructor-arg value="#{jobParameters[inputFileUrl]}" /> </bean> </property> <property name="lineMapper"> <bean class="org.springframework.batch.item.file.mapping.DefaultLineMapper"> <property name="lineTokenizer"> <bean class="org.springframework.batch.item.file.transform.DelimitedLineTokenizer"> <property name="delimiter" value=";" /> <property name="names"> <list> <value>zipCode</value> <value>city</value> <value>name</value> <value>addressType</value> <value>countyNumber</value> <value>countyName</value> </list> </property> </bean> </property> <property name="fieldSetMapper"> <bean class="com.davidkarlsen.zipcodeservice.dataload.ZipCodeFieldSetMapper" /> </property> </bean> </property> </bean> {code} {noformat} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.flatFileItemReader' defined in class path resource [com/davidkarlsen/zipcodeservice/dataload/batch-context.xml]: Cannot create inner bean 'org.springframework.core.io.UrlResource#1242b11' of type [org.springframework.core.io.UrlResource] while setting bean property 'resource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.core.io.UrlResource#1242b11' defined in class path resource [com/davidkarlsen/zipcodeservice/dataload/batch-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.core.io.UrlResource]: Constructor threw exception; nested exception is java.net.MalformedURLException: no protocol: %{jobParameters[inputFileUrl]} at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1305) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1067) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:328) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.batch.core.scope.StepScope.get(StepScope.java:146) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:33) [spring-aop-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:182) [spring-aop-3.0.0.RELEASE.jar:3.0.0.RELEASE] at $Proxy18.close(Unknown Source) [na:na] at org.springframework.batch.item.support.CompositeItemStream.close(CompositeItemStream.java:86) [spring-batch-infrastructure-2.1.0.M4.jar:na] at org.springframework.batch.core.step.item.ChunkMonitor.close(ChunkMonitor.java:104) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.item.support.CompositeItemStream.close(CompositeItemStream.java:86) [spring-batch-infrastructure-2.1.0.M4.jar:na] at org.springframework.batch.core.step.tasklet.TaskletStep.close(TaskletStep.java:284) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:256) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:115) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:61) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:144) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:124) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:99) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:276) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:118) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48) [spring-core-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:112) [spring-batch-core-2.1.0.M4.jar:na] at com.davidkarlsen.zipcodeservice.dataload.BatchTest.testReadFile(BatchTest.java:60) [test-classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_17] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_17] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_17] at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_17] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) [junit-4.7.jar:na] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) [junit-4.7.jar:na] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) [junit-4.7.jar:na] at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) [junit-4.7.jar:na] at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) [junit-4.7.jar:na] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) [junit-4.7.jar:na] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) [junit-4.7.jar:na] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) [junit-4.7.jar:na] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) [junit-4.7.jar:na] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) [junit-4.7.jar:na] at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.junit.runners.ParentRunner.run(ParentRunner.java:236) [junit-4.7.jar:na] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) [surefire-junit4-2.4.3.jar:2.4.3] at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) [surefire-api-2.4.3.jar:2.4.3] at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) [surefire-api-2.4.3.jar:2.4.3] at org.apache.maven.surefire.Surefire.run(Surefire.java:177) [surefire-api-2.4.3.jar:2.4.3] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_17] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_17] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_17] at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_17] at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) [surefire-booter-2.4.3.jar:2.4.3] at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) [surefire-booter-2.4.3.jar:2.4.3] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.core.io.UrlResource#1242b11' defined in class path resource [com/davidkarlsen/zipcodeservice/dataload/batch-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.core.io.UrlResource]: Constructor threw exception; nested exception is java.net.MalformedURLException: no protocol: %{jobParameters[inputFileUrl]} at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:283) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:984) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:886) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:479) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] ... 60 common frames omitted {noformat}
    via by David J. M. Karlsen,
  • This late binding worked in 2.0.4 but not in the latest 2.1 milestone: {code} <bean id="flatFileItemReader" class="org.springframework.batch.item.file.FlatFileItemReader" scope="step"> <property name="strict" value="false" /> <property name="resource"> <bean class="org.springframework.core.io.UrlResource" scope="step"> <constructor-arg value="#{jobParameters[inputFileUrl]}" /> </bean> </property> <property name="lineMapper"> <bean class="org.springframework.batch.item.file.mapping.DefaultLineMapper"> <property name="lineTokenizer"> <bean class="org.springframework.batch.item.file.transform.DelimitedLineTokenizer"> <property name="delimiter" value=";" /> <property name="names"> <list> <value>zipCode</value> <value>city</value> <value>name</value> <value>addressType</value> <value>countyNumber</value> <value>countyName</value> </list> </property> </bean> </property> <property name="fieldSetMapper"> <bean class="com.davidkarlsen.zipcodeservice.dataload.ZipCodeFieldSetMapper" /> </property> </bean> </property> </bean> {code} {noformat} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.flatFileItemReader' defined in class path resource [com/davidkarlsen/zipcodeservice/dataload/batch-context.xml]: Cannot create inner bean 'org.springframework.core.io.UrlResource#1242b11' of type [org.springframework.core.io.UrlResource] while setting bean property 'resource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.core.io.UrlResource#1242b11' defined in class path resource [com/davidkarlsen/zipcodeservice/dataload/batch-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.core.io.UrlResource]: Constructor threw exception; nested exception is java.net.MalformedURLException: no protocol: %{jobParameters[inputFileUrl]} at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1305) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1067) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:328) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.batch.core.scope.StepScope.get(StepScope.java:146) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:33) [spring-aop-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:182) [spring-aop-3.0.0.RELEASE.jar:3.0.0.RELEASE] at $Proxy18.close(Unknown Source) [na:na] at org.springframework.batch.item.support.CompositeItemStream.close(CompositeItemStream.java:86) [spring-batch-infrastructure-2.1.0.M4.jar:na] at org.springframework.batch.core.step.item.ChunkMonitor.close(ChunkMonitor.java:104) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.item.support.CompositeItemStream.close(CompositeItemStream.java:86) [spring-batch-infrastructure-2.1.0.M4.jar:na] at org.springframework.batch.core.step.tasklet.TaskletStep.close(TaskletStep.java:284) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:256) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:115) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:61) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:144) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:124) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:99) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:276) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:118) [spring-batch-core-2.1.0.M4.jar:na] at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48) [spring-core-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:112) [spring-batch-core-2.1.0.M4.jar:na] at com.davidkarlsen.zipcodeservice.dataload.BatchTest.testReadFile(BatchTest.java:60) [test-classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_17] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_17] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_17] at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_17] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) [junit-4.7.jar:na] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) [junit-4.7.jar:na] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) [junit-4.7.jar:na] at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) [junit-4.7.jar:na] at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) [junit-4.7.jar:na] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) [junit-4.7.jar:na] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) [junit-4.7.jar:na] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) [junit-4.7.jar:na] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) [junit-4.7.jar:na] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) [junit-4.7.jar:na] at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.junit.runners.ParentRunner.run(ParentRunner.java:236) [junit-4.7.jar:na] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) [spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) [surefire-junit4-2.4.3.jar:2.4.3] at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) [surefire-api-2.4.3.jar:2.4.3] at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) [surefire-api-2.4.3.jar:2.4.3] at org.apache.maven.surefire.Surefire.run(Surefire.java:177) [surefire-api-2.4.3.jar:2.4.3] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_17] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_17] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_17] at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_17] at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) [surefire-booter-2.4.3.jar:2.4.3] at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) [surefire-booter-2.4.3.jar:2.4.3] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.core.io.UrlResource#1242b11' defined in class path resource [com/davidkarlsen/zipcodeservice/dataload/batch-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.core.io.UrlResource]: Constructor threw exception; nested exception is java.net.MalformedURLException: no protocol: %{jobParameters[inputFileUrl]} at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:283) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:984) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:886) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:479) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270) [spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] ... 60 common frames omitted {noformat}
    via by David J. M. Karlsen,
  • Injection of autowired dependencies failed
    via by Beth Candida,
    • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.flatFileItemReader' defined in class path resource [com/davidkarlsen/zipcodeservice/dataload/batch-context.xml]: Cannot create inner bean 'org.springframework.core.io.UrlResource#1242b11' of type [org.springframework.core.io.UrlResource] while setting bean property 'resource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.core.io.UrlResource#1242b11' defined in class path resource [com/davidkarlsen/zipcodeservice/dataload/batch-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.core.io.UrlResource]: Constructor threw exception; nested exception is java.net.MalformedURLException: no protocol: %{jobParameters[inputFileUrl]} at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)[spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)[spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1305)[spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1067)[spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)[spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)[spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:328)[spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.batch.core.scope.StepScope.get(StepScope.java:146)[spring-batch-core-2.1.0.M4.jar:na] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)[spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)[spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:33)[spring-aop-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:182)[spring-aop-3.0.0.RELEASE.jar:3.0.0.RELEASE] at $Proxy18.close(Unknown Source)[na:na] at org.springframework.batch.item.support.CompositeItemStream.close(CompositeItemStream.java:86)[spring-batch-infrastructure-2.1.0.M4.jar:na] at org.springframework.batch.core.step.item.ChunkMonitor.close(ChunkMonitor.java:104)[spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.item.support.CompositeItemStream.close(CompositeItemStream.java:86)[spring-batch-infrastructure-2.1.0.M4.jar:na] at org.springframework.batch.core.step.tasklet.TaskletStep.close(TaskletStep.java:284)[spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:256)[spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:115)[spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:61)[spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60)[spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:144)[spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:124)[spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:99)[spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:276)[spring-batch-core-2.1.0.M4.jar:na] at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:118)[spring-batch-core-2.1.0.M4.jar:na] at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48)[spring-core-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:112)[spring-batch-core-2.1.0.M4.jar:na] at com.davidkarlsen.zipcodeservice.dataload.BatchTest.testReadFile(BatchTest.java:60)[test-classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.6.0_17] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[na:1.6.0_17] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_17] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_17] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)[junit-4.7.jar:na] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)[junit-4.7.jar:na] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)[junit-4.7.jar:na] at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)[junit-4.7.jar:na] at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)[spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)[spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)[spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)[spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)[junit-4.7.jar:na] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)[junit-4.7.jar:na] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)[junit-4.7.jar:na] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)[junit-4.7.jar:na] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)[junit-4.7.jar:na] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)[junit-4.7.jar:na] at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)[spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)[spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.junit.runners.ParentRunner.run(ParentRunner.java:236)[junit-4.7.jar:na] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)[spring-test-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)[surefire-junit4-2.4.3.jar:2.4.3] at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)[surefire-api-2.4.3.jar:2.4.3] at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)[surefire-api-2.4.3.jar:2.4.3] at org.apache.maven.surefire.Surefire.run(Surefire.java:177)[surefire-api-2.4.3.jar:2.4.3] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.6.0_17] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[na:1.6.0_17] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_17] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_17] at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)[surefire-booter-2.4.3.jar:2.4.3] at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)[surefire-booter-2.4.3.jar:2.4.3] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.core.io.UrlResource#1242b11' defined in class path resource [com/davidkarlsen/zipcodeservice/dataload/batch-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.core.io.UrlResource]: Constructor threw exception; nested exception is java.net.MalformedURLException: no protocol: %{jobParameters[inputFileUrl]} at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:283)[spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:984)[spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:886)[spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:479)[spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)[spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)[spring-beans-3.0.0.RELEASE.jar:3.0.0.RELEASE] ... 60 more

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    marcbouvierdavmarcbouvierdav
    4 times, last one,
    andyglickandyglick
    12 times, last one,
    ifercaiferca
    7 times, last one,
    HronomHronom
    1 times, last one,
    29 more bugmates