org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManager' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: Ljavax/transaction/TransactionManager;

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

If JVM throws ClassNotFoundException the class is not found in classpath. It means that something is not configured correctly. So check the relevant class is in the classpath. If the class is packaged into a jar, the jar should also in the classpath.

,

If JVM throws ClassNotFoundException the class is not found in classpath. It means that something isn't configured correctly. So check whether the class is in the classpath. If this class is packaged to a jar file. Then the jar must also be in the lib path

Solutions on the web

via SpringSource Issue Tracker by Mike Youngstrom, 1 year ago
Error creating bean with name 'cacheManager' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: Ljavax/transaction/TransactionManager;
via SpringSource Issue Tracker by Mike Youngstrom, 1 year ago
Error creating bean with name 'cacheManager' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: Ljavax/transaction/TransactionManager;
via SpringSource Issue Tracker by Mike Youngstrom, 1 year ago
Error creating bean with name 'displayNameCache' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: LRU isn't a valid eviction policy
via SpringSource Issue Tracker by Mike Youngstrom, 1 year ago
Error creating bean with name 'displayNameCache' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: LRU isn't a valid eviction policy
via Google Groups by Roland van Laar, 10 months ago
Error creating bean with name 'org.fcrepo.server.Server' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Fatal error while starting server
via Stack Overflow by Nirmal
, 1 year ago
Error creating bean with name 'sessionFactory' defined in URL [jndi:/localhost/MailServerV2/WEB-INF/classes/spring-config/spring-db-applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Could not parse configuration: jndi:/localhost/MailServerV2/WEB-INF/classes/hibernate.cfg.xml
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManager' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: Ljavax/transaction/TransactionManager;
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
at com.springsource.loaded.ri.ReflectiveInterceptor.getRType(ReflectiveInterceptor.java:767)
at com.springsource.loaded.ri.ReflectiveInterceptor.jlClassGetDeclaredConstructor(ReflectiveInterceptor.java:359)
at com.springsource.loaded.ri.ReflectiveInterceptor.jlClassNewInstance(ReflectiveInterceptor.java:839)
at net.sf.ehcache.CacheManager.configure(CacheManager.java:572)
at net.sf.ehcache.CacheManager.init(CacheManager.java:351)
at net.sf.ehcache.CacheManager.(CacheManager.java:281)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:623)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1320)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:862)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

Users with the same issue

Once, 1 week ago
2 times, 9 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago
473 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.