I am implementing a jsf+spring+hibernate web app, I am using hibernate-entitymanager 5.2.13, this is my dependency in pom.xml:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.2.13.Final</version>
</dependency>
But I receive error AbstractMethodError
. I get clue from here and use command mvn enforcer:enforce
to find out the dependency conflict. This is the output:
Dependency convergence error for org.jboss.logging:jboss-logging:3.3.1.Final paths to dependency are:
+-com.peter:Project:0.0.1-SNAPSHOT
+-org.hibernate:hibernate-entitymanager:5.2.13.Final
+-org.jboss.logging:jboss-logging:3.3.1.Final
and
+-com.peter:Project:0.0.1-SNAPSHOT
+-org.hibernate:hibernate-entitymanager:5.2.13.Final
+-org.hibernate:hibernate-core:5.2.13.Final
+-org.jboss.logging:jboss-logging:3.3.1.Final
and
+-com.peter:Project:0.0.1-SNAPSHOT
+-org.hibernate:hibernate-entitymanager:5.2.13.Final
+-org.hibernate.common:hibernate-commons-annotations:5.0.1.Final
+-org.jboss.logging:jboss-logging:3.3.0.Final
Obviously, hibernate-entitymanager:5.2.13.Final
has multiple version of jboss-logging
which are jboss-logging:3.3.1.Final
and jboss-logging:3.3.0.Final
from different package. How can I fix this issue? Can it fix by excluding the one under hibernate-commons-annotations
package? I try to exclude it like this:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.2.13.Final</version>
<exclusions>
<exclusion>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
but it came out another error saying that jboss-logging class is required, I guess it is because the attempt above is to exclude all jboss-logging from the dependencies. What I want is to exclude the one from org.hibernate.common:hibernate-commons-annotations
only. Any idea?