java.lang.NoSuchMethodError: org.hibernate.cfg.Environment.verifyProperties
阿新 • • 發佈:2018-01-11
core environ ber pid 4.0 flow cti pos png
我在使用jpa2+spring4+hibernate4 的時候,報錯java.lang.NoSuchMethodError: org.hibernate.cfg.Environment.verifyProperties
查了很多資料,是因為jar包問題,
我修改了
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>3.3.0.ga</version>
</dependency>
改成
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>4.0.5.Final</version>
</dependency>
或者直接刪除,maven 根據hiberenate-core 4 自動引入
參考鏈接:
https://stackoverflow.com/questions/11553202/java-lang-nosuchmethoderror-org-hibernate-cfg-environment-verifyproperties
java.lang.NoSuchMethodError: org.hibernate.cfg.Environment.verifyProperties