gpt4 book ai didi

java.lang.NoSuchMethodError : org. hibernate.annotations.common.reflection.java.JavaReflectionManager.setMetadataProvider

转载 作者:行者123 更新时间:2023-12-01 11:29:29 28 4
gpt4 key购买 nike

尝试使用 Configuration.BuildSessionFactory(serviceRegistry) 时出现错误

java.lang.NoSuchMethodError: org.hibernate.annotations.common.reflection.java.JavaReflectionManager.setMetadataProvider

这是我的相关 Hibernate 依赖项:

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.3.10.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.5.4.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.1.3.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>
hibernate-validator-annotation-processor
</artifactId>
<version>5.1.3.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>5.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.10.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search</artifactId>
<version>5.2.0.Final</version>
</dependency>

我不知道出了什么问题,请帮忙!

最佳答案

在 pom.xml 中添加依赖项

<dependency>
<groupId>hibernate-commons-annotations</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>3.5.6-Final</version>
</dependency>

关于java.lang.NoSuchMethodError : org. hibernate.annotations.common.reflection.java.JavaReflectionManager.setMetadataProvider,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30531790/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com