jeudi 25 juin 2015

Loader constraint violation: loader (instance of org/jboss/mx/loading/UnifiedClassLoader3) previously initiated loading for a different type with name

In my ear, there are 2 jars called myprovider.jar and myclient.jar and both are located in the server/default/deploy/jbossweb-tomcat . One of instance of myprovider.jar is initialized in ear and passed into the myclient.jar. A class in myclient.jar has reference variable to hold the passing instance from ear. When that instance is assigned to the internal varialbe, the following exception is thrown in JBoss.

Caused by: java.lang.ClassNotFoundException: Unexpected error during load of: provider.xpackage.Xclass, msg=loader constraint violation: loader (instance of org/jboss/mx/loading/UnifiedClassLoader3) previously initiated loading for a different type with name "provider/xpackage/XClass"
    at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:512)
    at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:377)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    ... 86 more

How can I solve this and pass the instance into the client.jar ? I use jboss 4 and java 7.

Aucun commentaire:

Enregistrer un commentaire