Spring + Hibernate + Tomcat依赖问题 [英] Spring + Hibernate + Tomcat Dependency problems
问题描述
当我运行tomcat并部署了战争时,我得到:
NoClassDefFoundError:org / apache / commons / collections / map / LRUMap
调用init方法失败;嵌套异常是
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java)中的java.lang.NoClassDefFoundError:
org / apache / commons / collections / map / LRUMap
:527)
〜[spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
奇怪的是,我在我的WEB-INF lib文件夹中得到了 commons-collections-2.1.jar
(我甚至试过3.1) p>
编辑:
我的 commons-collections
从 WEB-INF / lib
到 Tomcat lib
,它似乎工作。然而,我将无法在生产服务器上执行此操作,为何不使用我的 WEB-INF / lib
版本?
好的,我确实把commons-collections的3.2.1版本和错误消失了。不幸的是我仍然不知道哪个库取决于这个版本。即使 mvn dependency:tree
也没有帮助...
when I run tomcat and the war is deployed I get : NoClassDefFoundError : org/apache/commons/collections/map/LRUMap
Invocation of init method failed; nested exception is
java.lang.NoClassDefFoundError:
org/apache/commons/collections/map/LRUMap
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
~[spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
What is strange is that I got the commons-collections-2.1.jar
(I even tried 3.1) in my WEB-INF lib folder.
Edit :
I did copy the commons-collections
from WEB-INF/lib
to Tomcat lib
and it seems to work. However I won't be able to do that on the production server, why isn't it taking my WEB-INF/lib
version ?
Ok so I did put version 3.2.1 of commons-collections and the error disappeared. I unfortunately still don't know which library is depending on this version. Even mvn dependency:tree
didn't help ...
这篇关于Spring + Hibernate + Tomcat依赖问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!