0

I get an error when trying to use Configuration.BuildSessionFactory(serviceRegistry)

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

Here my relevant Hibernate dependencies :

<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>

I can't figure what's going wrong, please help !

0

1 Answer 1

1

add the dependency in your pom.xml

<dependency>
     <groupId>hibernate-commons-annotations</groupId>
     <artifactId>hibernate-commons-annotations</artifactId>
     <version>3.5.6-Final</version>
 </dependency>
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your answer ! I added the dependency but it did not solve my problem, I'm still getting the same error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.