org.springframework.beans.factory.BeanCreationException

Error creating bean with name 'scopedTarget.batchReader': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.abc.batch.dao.FileMetadataDAO com.abc.batch.reader.SampleReader.metaData; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'jdbcFileMetaDataDAO' is defined

Samebug tips3

Check Servers Launch Configuration in Eclipse. See the details below.


rprp

Spring expects that the EntityManagerFactory has to be called "entityManagerFactory". It uses convention over configuration to make it easier to use.


rprp

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web539

  • via Unknown by Beth Candida,
  • Stack trace

    • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.batchReader': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.abc.batch.dao.FileMetadataDAO com.abc.batch.reader.SampleReader.metaData; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'jdbcFileMetaDataDAO' is defined at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:332) at org.springframework.batch.core.scope.StepScope.get(StepScope.java:150) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:328) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:33) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:184) at $Proxy64.read(Unknown Source) at org.springframework.batch.core.step.item.SimpleChunkProvider.doRead(SimpleChunkProvider.java:90) at org.springframework.batch.core.step.item.SimpleChunkProvider.read(SimpleChunkProvider.java:148) at org.springframework.batch.core.step.item.SimpleChunkProvider$1.doInIteration(SimpleChunkProvider.java:108)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    marcbouvierdavmarcbouvierdav
    4 times, last one
    andyglickandyglick
    12 times, last one
    Михайло ТітовМихайло Тітов
    Unknown UserUnknown User
    37 times, last one
    111 more bugmates