我有一个与休眠问题。问题:在ServletContext资源[/WEB-INF/spring/appServlet/servlet-context.xml]中定义名称为'emf'的Bean时创建错误:调用init方法失败;嵌套的例外是java.lang.NoSuchMethodError:org.hibernate.cfg.Environment.verifyProperties(Ljava/UTIL /地图;)VNoSuchMethodError - org.hibernate.cfg.Environment
这是XML文件(servlet的上下文中):http://pastebin.com/BRYvbVTg
而且,我有从休眠状态只有一个依赖:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.2.4.Final</version>
</dependency>
在classpath中,尝试添加所有的软件包,具有相同的效果
完整堆栈跟踪:http://pastebin.com/wJy7QfPW
最好添加一个完整的堆栈跟踪。 –
看到这个答案http://stackoverflow.com/questions/11553202/java-lang-nosuchmethoderror-org-hibernate-cfg-environment-verifyproperties,看起来像类路径上的一些旧版本的hibernate – borowis
我如何删除本地库Maven(Linux)? – mrchebik