org.springframework.beans.factory.BeanCreationException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

You need to deploy aspectJ (aspectjweaver.jar) together with your application. Add it to your pom.xml

tip

Spring Security detects beans in the root context. Move the detection of the bean (or declare it explictly) in the root context.

tip

Mixed JpaTransactionManager with JTA transaction type in the beans.xml and persistence.xml

tip

Upgrade to Confluence 3.5.5 or install the patch as explained in the details.

tip

Your applicationcontext.xml has a transactionManager defined. Your would need to remove it or add an entity manager.

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

  • Jar Hell
    via GitHub by virtualdogbert
    ,
  • Spring 4 @AutoWired Failed
    via Stack Overflow by Débora
    ,
  • BruceBlog: Using Spring to Send JMS Messages
    via by Unknown author,
    • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditListener': Cannot resolve reference to bean 'indexRequestQueue' while setting bean property 'indexRequestQueue'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'indexRequestQueue': Cannot resolve reference to bean 'elasticSearchClient' while setting bean property 'elasticSearchClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'elasticSearchClient': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: failed to load bundle [file:/ptmp/progs/elasticsearch-2.3.3/modules/reindex/reindex-2.3.3.jar] due to jar hell at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:117)[spring-boot-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:689)[spring-boot-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1475) at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)[spring-boot-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1220) at grails.boot.GrailsApp.run(GrailsApp.groovy:51)[grails-core-3.0.11.jar:3.0.11] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) at grails.boot.GrailsApp.run(GrailsApp.groovy:335)[grails-core-3.0.11.jar:3.0.11] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at grails.boot.GrailsApp.run(GrailsApp.groovy:324)[grails-core-3.0.11.jar:3.0.11] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) at grails.boot.GrailsApp$run.call(Unknown Source)[grails-core-3.0.11.jar:3.0.11] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)[groovy-2.4.5.jar:2.4.5] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)[groovy-2.4.5.jar:2.4.5] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)[groovy-2.4.5.jar:2.4.5] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755) at exaservice.Application.main(Application.groovy:18)[main/:na] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:759) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'indexRequestQueue': Cannot resolve reference to bean 'elasticSearchClient' while setting bean property 'elasticSearchClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'elasticSearchClient': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: failed to load bundle [file:/ptmp/progs/elasticsearch-2.3.3/modules/reindex/reindex-2.3.3.jar] due to jar hell at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:117) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:689) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1475)[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1220)[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE] at grails.boot.GrailsApp.run(GrailsApp.groovy:51) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE] at grails.boot.GrailsApp.run(GrailsApp.groovy:335) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE] at grails.boot.GrailsApp.run(GrailsApp.groovy:324) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE] at grails.boot.GrailsApp$run.call(Unknown Source) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE] at exaservice.Application.main(Application.groovy:18) ... 23 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'indexRequestQueue': Cannot resolve reference to bean 'elasticSearchClient' while setting bean property 'elasticSearchClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'elasticSearchClient': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: failed to load bundle [file:/ptmp/progs/elasticsearch-2.3.3/modules/reindex/reindex-2.3.3.jar] due to jar hell Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'elasticSearchClient': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: failed to load bundle [file:/ptmp/progs/elasticsearch-2.3.3/modules/reindex/reindex-2.3.3.jar] due to jar hell at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1475) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1523)[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1220) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:314)[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)

    Users with the same issue

    linxiaolong
    1 times, last one,
    tvrmsmith
    6 times, last one,
    qavid
    27 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    63 more bugmates