Java.lang.NoSuchMethodException

来源:互联网 发布:mysql 现实数据库 编辑:程序博客网 时间:2024/05/29 18:05

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in ServletContext resource [/WEB-INF/applicationContext-common.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate4.SpringSessionContext]: No default constructor found; nested exception is java.lang.NoSuchMethodException: 

最近的项目很是奇特,在所有操作系统的所有版本的tomcat都能欢快的跑起来,就是在客户那里跑不起来,报这个错,后来经排查,发现该项目依赖的另一个项目的jar包里有冲突,这两个包是

spring-data-commons和spring-data-commons-core,删掉spring-data-commons-core包就好了。

问题虽然解决了,但我还是想知道是什么情况会导致别的tomcat都不挑刺就这个火眼金睛看出毛病了。

另外附上一篇文章,比较详细http://blog.csdn.net/e5945/article/details/8565753

0 0
原创粉丝点击