zoukankan      html  css  js  c++  java
  • java.lang.NoSuchMethodError: org.hibernate.cfg.Environment.verifyProperties

    我在使用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

  • 相关阅读:
    ActiveMQ持久化机制
    ActiveMQ的使用
    ActiveMQ解释
    Linux CentOS安装Tomcat
    nginx使用Keepalived
    Session共享解决方案
    Spring框架AOP使用扩展
    Myabtis测试(二)错题整理分析
    初识Spring及打印机案例
    MyBatis注解
  • 原文地址:https://www.cnblogs.com/litblank/p/8267207.html
Copyright © 2011-2022 走看看