【问题标题】:getting error in my spring programme在我的春季程序中出错
【发布时间】:2017-10-06 10:54:50
【问题描述】:
java.lang.NoSuchMethodError: org.hibernate.cfg.annotations.reflection.JPAMetadataProvider.<init>(Lorg/hibernate/boot/spi/MetadataBuildingOptions;)V

当连接到休眠连接时,我得到了这种类型的 错误。

【问题讨论】:

标签: hibernate spring-boot


【解决方案1】:

here复制了答案。就我而言,以下依赖之间存在冲突:

  1. 休眠注释:

    <dependency>
     <groupId>org.hibernate</groupId>
     <artifactId>hibernate-annotations</artifactId>
     <version>3.5.6-Final</version>
    </dependency>
    
  2. Hibernate Commons 注释:

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-commons-annotations</artifactId>
      <version>3.2.0.Final</version>
    </dependency>
    

我通过删除两个依赖项并使用以下依赖项解决了冲突:

Hibernate Commons 注释 » 5.0.1.Final

     <dependency>
      <groupId>org.hibernate.common</groupId>
      <artifactId>hibernate-commons-annotations</artifactId>
      <version>5.0.1.Final</version>
     </dependency>

希望这可能对某人有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-03-12
    • 1970-01-01
    • 2015-12-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多