-1
java.lang.NoSuchMethodError: org.hibernate.cfg.annotations.reflection.JPAMetadataProvider.<init>(Lorg/hibernate/boot/spi/MetadataBuildingOptions;)V
同時連接到冬眠連接我得到這種類型的 錯誤的。得到錯誤在我的春天項目
java.lang.NoSuchMethodError: org.hibernate.cfg.annotations.reflection.JPAMetadataProvider.<init>(Lorg/hibernate/boot/spi/MetadataBuildingOptions;)V
同時連接到冬眠連接我得到這種類型的 錯誤的。得到錯誤在我的春天項目
複製了here的答案。就我而言,有以下depdencies之間的衝突:
Hibernate註解:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.5.6-Final</version>
</dependency>
休眠共享註釋:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>3.2.0.Final</version>
</dependency>
我通過消除雙方解決衝突依賴關係並使用以下內容:
休眠共享註解»5.0.1.Final
<dependency>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>5.0.1.Final</version>
</dependency>
希望這可以幫助別人。
歡迎來到堆棧溢出。請閱讀https://stackoverflow.com/help/how-to-ask並改進您的問題。 –