org.springframework.beans.factory.BeanCreationException

Error creating bean with name 'companyxyzCacheManager' defined in class path resource [com/companyxyz/data/spring-config-data-common.xml]: Cannot create inner bean 'net.sf.ehcache.CacheManager#102ead5' of type [net.sf.ehcache.CacheManager] while setting bean property 'ehCacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.sf.ehcache.CacheManager#102ead5' defined in class path resource [com/companyxyz/data/spring-config-data-common.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static net.sf.ehcache.CacheManager net.sf.ehcache.CacheManager.create(java.net.URL) throws net.sf.ehcache.CacheException] threw exception; nested exception is java.lang.NullPointerException

Samebug tips0

We couldn't find tips for this exception.

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

Solutions on the web11

  • via Unknown by Kevin Schmidt,
  • via Unknown by Kevin Schmidt,
  • Stack trace

    • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyxyzCacheManager' defined in class path resource [com/companyxyz/data/spring-config-data-common.xml]: Cannot create inner bean 'net.sf.ehcache.CacheManager#102ead5' of type [net.sf.ehcache.CacheManager] while setting bean property 'ehCacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.sf.ehcache.CacheManager#102ead5' defined in class path resource [com/companyxyz/data/spring-config-data-common.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static net.sf.ehcache.CacheManager net.sf.ehcache.CacheManager.create(java.net.URL) throws net.sf.ehcache.CacheException] threw exception; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) 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: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:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at com.companyxyz.util.WebApplicationContextManager.initWebApplicationContext(WebApplicationContextManager.java:68) at com.companyxyz.web.servlet.filter.RootFilter.doFilter(RootFilter.java:135) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.sf.ehcache.CacheManager#102ead5' defined in class path resource [com/companyxyz/data/spring-config-data-common.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static net.sf.ehcache.CacheManager net.sf.ehcache.CacheManager.create(java.net.URL) throws net.sf.ehcache.CacheException] threw exception; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:444) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:903) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:817) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) 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.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219) ... 29 more Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static net.sf.ehcache.CacheManager net.sf.ehcache.CacheManager.create(java.net.URL) throws net.sf.ehcache.CacheException] threw exception; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:127) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:435) ... 36 more Caused by: java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.putAll(ConcurrentHashMap.java:908) at net.sf.ehcache.CacheManager.configure(CacheManager.java:589) at net.sf.ehcache.CacheManager.init(CacheManager.java:358) at net.sf.ehcache.CacheManager.<init>(CacheManager.java:272) at net.sf.ehcache.CacheManager.create(CacheManager.java:770) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:115) ... 37 more

    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

    We couldn't find other users who have seen this exception.