Announcement Announcement Module
Collapse
No announcement yet.
Cannot resolve reference to bean 'userCache' while setting bean property 'userCache'; Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot resolve reference to bean 'userCache' while setting bean property 'userCache';

    I'm upgrading an application to spring 2.5.6 and spring security 2.0.5 and am receiving the following error after modifying the userCache property of the DaoAuthenticationProvider in the security config file:

    It appears that all of the classes I need are either in the spring.jar:
    - org.springframework.cache.ehcache.EhCacheManagerFa ctoryBean
    - org.springframework.cache.ehcache.EhCacheFactoryBe an

    or the spring-security-core-2.0.5.RELEASE.jar:
    - org.springframework.security.providers.dao.cache.E hCacheBasedUserCache

    ...but obviously I still have some type of (version) problem.

    Any help would be appreciated.

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'requestServiceSecurity' defined in ServletContext resource [/WEB-INF/classes/passport/resources/service/requestServiceApplicationContext.xml]: Cannot resolve reference to bean 'authenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'authenticationManager' defined in ServletContext resource [/WEB-INF/classes/passport/resources/security/securityApplicationContext.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'daoAuthenticationProvider' defined in ServletContext resource [/WEB-INF/classes/passport/resources/security/securityApplicationContext.xml]: Cannot resolve reference to bean 'userCache' while setting bean property 'userCache'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'userCache' defined in ServletContext resource [/WEB-INF/classes/passport/resources/security/securityApplicationContext.xml]: Cannot resolve reference to bean 'userCacheBackend' while setting bean property 'cache'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'userCacheBackend' defined in ServletContext resource [/WEB-INF/classes/passport/resources/security/securityApplicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: net/sf/ehcache/Cache.<init>(Ljava/lang/String;ILnet/sf/ehcache/store/MemoryStoreEvictionPolicy;ZLjava/lang/String;ZJJZJLnet/sf/ehcache/event/RegisteredEventListeners;Lnet/sf/ehcache/bootstrap/BootstrapCacheLoader;I)V
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:275)
    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:1245)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:1010)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:472)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Access Controller.java:214)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:728)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:380)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:255)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:199)
    at org.springframework.web.context.ContextLoaderServl et.init(ContextLoaderServlet.java:81)
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:256)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.ini t(ServletWrapper.java:185)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.i nit(ServletWrapper.java:316)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.ini tialize(ServletWrapper.java:1119)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.i nitialize(ServletWrapper.java:149)
    at com.ibm.wsspi.webcontainer.extension.WebExtensionP rocessor.createServletWrapper(WebExtensionProcesso r.java:99)
    at com.ibm.ws.webcontainer.webapp.WebApp.initializeTa rgetMappings(WebApp.java:480)
    at com.ibm.ws.webcontainer.webapp.WebApp.commonInitia lizationFinish(WebApp.java:275)
    at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize (WebApp.java:272)
    at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebAp plication(WebGroup.java:88)
    at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplic ation(VirtualHost.java:157)
    at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(W ebContainer.java:655)
    at com.ibm.ws.wswebcontainer.WebContainer.addWebAppli cation(WebContainer.java:608)
    at com.ibm.ws.webcontainer.component.WebContainerImpl .install(WebContainerImpl.java:333)
    at com.ibm.ws.webcontainer.component.WebContainerImpl .start(WebContainerImpl.java:549)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.st art(ApplicationMgrImpl.java:1295)
    at com.ibm.ws.runtime.component.DeployedApplicationIm pl.fireDeployedObjectStart(DeployedApplicationImpl .java:1129)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.st art(DeployedModuleImpl.java:567)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.st artModule(ApplicationMgrImpl.java:1762)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl._s tartModule(ApplicationMgrImpl.java:1710)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$Ap plicationNotifier.classChanged(ApplicationMgrImpl. java:1922)
    at com.ibm.ws.classloader.ClassLoaderManager.checkAnd Notify(ClassLoaderManager.java:558)
    at com.ibm.ws.classloader.ClassLoaderManager.access$0 00(ClassLoaderManager.java:59)
    at com.ibm.ws.classloader.ClassLoaderManager$ReloadTi merTask.alarm(ClassLoaderManager.java:612)
    at com.ibm.ejs.util.am._Alarm.run(_Alarm.java:90)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1510)
Working...
X