jboss6.0 deploy j2ee applicaton classloader issue

Caused by: java.lang.NoClassDefFoundError: org/hornetq/api/core/client/ClientSession
        at java.lang.Class.getDeclaredMethods0(Native Method) [:1.6.0_07]
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) [:1.6.0_07]
        at java.lang.Class.getMethod0(Class.java:2670) [:1.6.0_07]
        at java.lang.Class.getMethod(Class.java:1603) [:1.6.0_07]
        at org.jboss.resource.deployment.ConfigPropertyHandler.getMethod(ConfigPropertyHandler.java:253) [:6.0.0.20101110-CR1]
        at org.jboss.resource.deployment.ConfigPropertyHandler.handle(ConfigPropertyHandler.java:142) [:6.0.0.20101110-CR1]
        at org.jboss.resource.deployment.ConfigPropertyHandler.handle(ConfigPropertyHandler.java:221) [:6.0.0.20101110-CR1]
        at org.jboss.resource.deployment.ConfigPropertyHandler.handle(ConfigPropertyHandler.java:175) [:6.0.0.20101110-CR1]
        at org.jboss.resource.deployment.ResourceAdapterFactory.applyProperty(ResourceAdapterFactory.java:108) [:6.0.0.20101110-CR1]
        ... 74 more
Caused by: java.lang.ClassNotFoundException: Unexpected error during load of: org.hornetq.api.core.client.ClientSession, msg=loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "javax/transaction/xa/XAResource"
        at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:176) [jboss-classloader.jar:2.2.0.Alpha9]
        at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:260) [jboss-classloader.jar:2.2.0.Alpha9]
        at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1152) [jboss-classloader.jar:2.2.0.Alpha9]
        at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:886) [jboss-classloader.jar:2.2.0.Alpha9]
        at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:505) [jboss-classloader.jar:2.2.0.Alpha9]
        at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:450) [jboss-classloader.jar:2.2.0.Alpha9]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251) [:1.6.0_07]
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) [:1.6.0_07]
        ... 83 more
Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "javax/transaction/xa/XAResource"

---------------------------------------------------------------------------------------------

Solvtion:

  Because Jboss-Transaction-**.jar nested with hibernate lib jar - jta-**.jar, so need to remove jta-**.jar from application.

 

in additional:  slf-api-***.jar and slf-log4j12-***.jar will course conflection with jboss 6.0 lib, so need to

remove them

 

http://blog.csdn.net/wentasy/article/category/1289865?viewmode=contents

你可能感兴趣的:(ClassLoader)