I am trying to migrate a aplication running on wildfly 8.2 to jboss 7.2, using slf4j as logging framework. However when I try to deploy in JBoss, I get the following error:
Caused by: java.lang.LinkageError: Failed to link org/jboss/logging/Logger$Level (Module \"deployment.backend-2.1.2.war\" from Service Module Loader): loader constraint violation: loader (instance of org/jboss/modules/ModuleClassLoader) previously initiated loading for a different type with name \"org/jboss/logging/Logger$Level\""}}}
Current jboss-deployment-structure:
<exclusions>
<module name="org.apache.log4j" />
<module name="org.slf4j" />
<module name='org.slf4j.impl' />
<module name="org.apache.commons.logging" />
<module name="org.log4j" />
<module name="org.jboss.logging" />
</exclusions>
I couldn't find any solution to solve this error, running mvn dependency:tree
, org.jboss.logging was imported from Hibernate 4.3.11.Final, then my pom with hibernate now looks :
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
<exclusions>
<exclusion>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
But the same error persists.