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.

  • SRM Deployment Issue
    via by 807573,
  • Installation Libreplan Windows - Libreplan
    via by Unknown author,
  • Enabling global-method-security with JPA @PersistenceContext annotations will fail on startup. This is with the recent 2.0.0 release cut. My userDetailsService is a custom implementation that requires access to an @Repository bean with an EntityManager. <sec:http auto-config="true"> <sec:intercept-url pattern="/assets/**" access="IS_AUTHENTICATED_ANONYMOUSLY"/> <sec:intercept-url pattern="/login*" access="IS_AUTHENTICATED_ANONYMOUSLY"/> <sec:intercept-url pattern="/logout*" access="IS_AUTHENTICATED_ANONYMOUSLY"/> <sec:intercept-url pattern="/unsupported*" access="IS_AUTHENTICATED_ANONYMOUSLY"/> <sec:intercept-url pattern="/password-*" access="IS_AUTHENTICATED_ANONYMOUSLY"/> <sec:intercept-url pattern="/**" access="ROLE_USER,ROLE_ADMIN"/> <sec:form-login login-page="/login.html" default-target-url="/app.html" authentication-failure-url="?login_error=1"/> <sec:logout logout-success-url="/logout.html"/> </sec:http> <sec:authentication-provider user-service-ref="userDetailsService"> <sec:password-encoder ref="passwordEncoder" /> </sec:authentication-provider> <sec:global-method-security secured-annotations="enabled" /> The exception: 2008-04-15 04:50:26,490 ERROR [main] org.springframework.web.context.ContextLoader: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_rememberMeServicesInjectionBeanPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor': Cannot create inner bean '(inner bean)' of type [org.springframework.transaction.interceptor.TransactionInterceptor] while setting bean property 'transactionInterceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [epicenter-webapp-beans.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ehCacheManager' defined in class path resource [epicenter-repository-beans.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_methodDefinitionSourceAdvisor': Cannot create inner bean '(inner bean)' of type [org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot resolve reference to bean '_authenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_authenticationManager': Cannot resolve reference to bean 'org.springframework.security.providers.dao.DaoAuthenticationProvider#0' while setting bean property 'providers' with key [2]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.providers.dao.DaoAuthenticationProvider#0': Cannot resolve reference to bean 'userDetailsService' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDetailsService': Injection of resource fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionRepository': Injection of persistence fields failed; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:478) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:217) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881) at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:606) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:366) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    via by Steve Kondik,
  • Enabling global-method-security with JPA @PersistenceContext annotations will fail on startup. This is with the recent 2.0.0 release cut. My userDetailsService is a custom implementation that requires access to an @Repository bean with an EntityManager. <sec:http auto-config="true"> <sec:intercept-url pattern="/assets/**" access="IS_AUTHENTICATED_ANONYMOUSLY"/> <sec:intercept-url pattern="/login*" access="IS_AUTHENTICATED_ANONYMOUSLY"/> <sec:intercept-url pattern="/logout*" access="IS_AUTHENTICATED_ANONYMOUSLY"/> <sec:intercept-url pattern="/unsupported*" access="IS_AUTHENTICATED_ANONYMOUSLY"/> <sec:intercept-url pattern="/password-*" access="IS_AUTHENTICATED_ANONYMOUSLY"/> <sec:intercept-url pattern="/**" access="ROLE_USER,ROLE_ADMIN"/> <sec:form-login login-page="/login.html" default-target-url="/app.html" authentication-failure-url="?login_error=1"/> <sec:logout logout-success-url="/logout.html"/> </sec:http> <sec:authentication-provider user-service-ref="userDetailsService"> <sec:password-encoder ref="passwordEncoder" /> </sec:authentication-provider> <sec:global-method-security secured-annotations="enabled" /> The exception: 2008-04-15 04:50:26,490 ERROR [main] org.springframework.web.context.ContextLoader: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_rememberMeServicesInjectionBeanPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor': Cannot create inner bean '(inner bean)' of type [org.springframework.transaction.interceptor.TransactionInterceptor] while setting bean property 'transactionInterceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [epicenter-webapp-beans.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ehCacheManager' defined in class path resource [epicenter-repository-beans.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_methodDefinitionSourceAdvisor': Cannot create inner bean '(inner bean)' of type [org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot resolve reference to bean '_authenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_authenticationManager': Cannot resolve reference to bean 'org.springframework.security.providers.dao.DaoAuthenticationProvider#0' while setting bean property 'providers' with key [2]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.providers.dao.DaoAuthenticationProvider#0': Cannot resolve reference to bean 'userDetailsService' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDetailsService': Injection of resource fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionRepository': Injection of persistence fields failed; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:478) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:217) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881) at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:606) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:366) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    via by Steve Kondik,
    • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource' defined in ServletContext resource [WEB-INF/application-context.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DataSourceAdvisor' defined in ServletContext resource [WEB-INF/dataaccess-context.xml]: Cannot create inner bean 'org.springframework.aop.support.JdkRegexpMethodPointcut#e51b2c' of type [org.springframework.aop.support.JdkRegexpMethodPointcut] while setting bean property 'pointcut'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.support.JdkRegexpMethodPointcut#e51b2c' defined in ServletContext resource [WEB-INF/dataaccess-context.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'businessUnitServiceAuditBusinessUnitAdvisor' defined in ServletContext resource [WEB-INF/rbacx-audit-context.xml]: Cannot create inner bean 'businessUnitServiceAuditAfterReturningAdvice' of type [com.vaau.rbacx.rbacxaudit.aop.businessunitserviceaudit.BusinessUnitServiceAuditAfterReturningAdvice] while setting bean property 'advice'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'businessUnitServiceAuditAfterReturningAdvice' defined in ServletContext resource [WEB-INF/rbacx-audit-context.xml]: Cannot resolve reference to bean 'daoAuditLogger' while setting bean property 'auditLogger'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoAuditLogger' defined in ServletContext resource [WEB-INF/rbacx-audit-context.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'indexGlobalUserGlobalUserUpdateAdvisor' defined in ServletContext resource [WEB-INF/search-context.xml]: Cannot create inner bean 'com.vaau.rbacx.search.aop.IndexAdvise#1cebc9f' of type [com.vaau.rbacx.search.aop.IndexAdvise] while setting bean property 'advice'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.vaau.rbacx.search.aop.IndexAdvise#1cebc9f' defined in ServletContext resource [WEB-INF/search-context.xml]: Cannot resolve reference to bean 'ftSearchProvider' while setting bean property 'searchProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ftSearchProvider' defined in ServletContext resource [WEB-INF/search-context.xml]: Cannot resolve reference to bean 'globalUserManagerTarget' while setting bean property 'userManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'globalUserManagerTarget' defined in ServletContext resource [WEB-INF/idw-context.xml]: Cannot resolve reference to bean 'globalUserDao' while setting bean property 'globalUserDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'globalUserDao' defined in ServletContext resource [WEB-INF/dataaccess-context.xml]: Cannot resolve reference to bean 'globalUserDaoTarget' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'globalUserDaoTarget' defined in ServletContext resource [WEB-INF/dataaccess-context.xml]: Cannot resolve reference to bean 'sqlMapClient' while setting bean property 'sqlMapClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in ServletContext resource [WEB-INF/dataaccess-context.xml]: Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:405) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168) at org.springframework.context.support.AbstractApplicationContext.initMessageSource(AbstractApplicationContext.java:627) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:368) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    12 more bugmates