-
1. Re: java.lang.LinkageError: loader constraint violation error
jameslivingston Feb 3, 2015 6:00 PM (in response to valsaraj007)1 of 1 people found this helpfulThat error means you have more than one definition of the MyPrivateKey class (likely in both the module and the EAR), and the caller (KeyLoginModule) and the class being called (MyKeyRing) have different ones.
Usually, you would want to remove the duplicated classes from the EAR, and use jboss-deployment-structure.xml to depend on the module.
-
2. Re: java.lang.LinkageError: loader constraint violation error
valsaraj007 Feb 4, 2015 12:26 AM (in response to jameslivingston)Thanks James!
The problem was I have this class in a jar inside ear lib and the same jar was in the custom jboss module that I created.
When I use only the module and remove the jar from ear lib, I am getting class not found error. So I removed dependency to this module (com.app.configuration) and it worked fine.
jboss-deployment-structure.xml:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
<deployment>
<dependencies>
<!--<module name="com.app.configuration"/>-->
</dependencies>
</deployment>
</jboss-deployment-structure>