I'm deploying an ear to JBoss and when I start the server I get this exception thrown:
Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "ch.qos.logback.classic.LoggerContext.getLogger(Ljava/lang/String;)Lorg/slf4j/Logger;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, ch/qos/logback/classic/LoggerContext, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for interface org/slf4j/ILoggerFactory have different Class objects for the type ;)Lorg/slf4j/Logger; used in the signature
I have an EAR project and in the deployment assembly I include logback-classic/logback-core/ and slf4j-api. When I do this, the three jars automatically get placed in the EAR Libraries folder in the build paths of 2 other ejb projects (which are both packaged as jars and referenced in the deployment assembly of the EAR)
not sure why this is happening.. Also, when I dont put the jars in the deployment assembly of the EAR, I link them in the build path of the 2 ejb projects directly, but when I deploy the ear JBoss throws noClassFound exception
on slf4j/Logger..
any ideas?
Fixed this issue.. I had to edit my jboss-deployment-structure.xml and add the main deployment with exclusions in addition to the sub-deployments that I had.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments