The class was not found, although it should be on the way to the classes

I get this error when I stop my war on Tomcat:

[2012-05-03 11:55:36,082] ERROR - org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(501) | Destroy method on bean with name 'threadPoolTaskExecutor' threw an exception
java.lang.NoClassDefFoundError: org/springframework/orm/jpa/EntityManagerFactoryUtils
    at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessBeforeDestruction(PersistenceAnnotationBeanPostProcessor.java:357)
    at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:193)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:498)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:474)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:442)
    at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1066)
    at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1040)
    at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:958)
Caused by: java.lang.ClassNotFoundException: org.springframework.orm.jpa.EntityManagerFactoryUtils
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
    ... 8 more

In my pom.xml, I have spring -orm 3.1.1.RELEASE as a dependency. Even stranger is that I can fall into the PersistenceAnnotationBeanPostProcessor class, which is the spring -orm 3.1.1.RELEASE class, but it cannot find the EntityManagerFactoryUtils class, which is in the same jar. I assume that this should be due to the fact that it is abstract or static, but I am not sure about the further directions for studying this problem. It seems to be available.

Anyone have thoughts on why this might happen?

+3
source share
2 answers

, ( mvn dependency: tree, ).

? Spring Tomcat libs? .

+3

, maven. - , .

0

All Articles