开发者

How to separate ear classloader and system classloader in JBoss 6?

开发者 https://www.devze.com 2023-01-30 03:17 出处:网络
I\'m trying to upgrade from JBoss 4.2.1 to JBoss 6.In JBoss 4.2.1, we are manually deploying our application as an exploded war and everything works beautifully.

I'm trying to upgrade from JBoss 4.2.1 to JBoss 6. In JBoss 4.2.1, we are manually deploying our application as an exploded war and everything works beautifully.

I'm running into problems because the application that I am trying to deploy uses versions of 3rd party libraries that are older than the ones that JBoss 6 now includes by default. The result of this is that I'm getting classloader conflicts all over the place and the application won't even start.

At present, I have tried using the JBoss Classloading Documentation as well as the scanty bits of documentation for jboss-classloading.xml and haven't had any success.

Has anyone out there managed to do this successfully? If you have, how did you do it?

I've included a stack trace below in case it offers any useful information.

Caused by: java.lang.Error: Error visiting "/C:/jboss6/server/default/deploy/app.war/WEB-INF/lib/jaxb-xjc-2.1.12.jar/1.0/com/sun/codemodel/JConditional.class"
    at org.jboss.classloading.plugins.vfs.VFSResourceVisitor.visit(VFSResourceVisitor.java:268) [jboss-classloading-vfs.jar:2.2.0.Alpha9]
    at org.jboss.vfs.Vi开发者_开发技巧rtualFile.visit(VirtualFile.java:407) [jboss-vfs.jar:3.0.0.CR5]
    at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:409) [jboss-vfs.jar:3.0.0.CR5]
    at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:409) [jboss-vfs.jar:3.0.0.CR5]
    at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:409) [jboss-vfs.jar:3.0.0.CR5]
    at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:409) [jboss-vfs.jar:3.0.0.CR5]
    at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:395) [jboss-vfs.jar:3.0.0.CR5]
    at org.jboss.classloading.plugins.vfs.VFSResourceVisitor.visit(VFSResourceVisitor.java:102) [jboss-classloading-vfs.jar:2.2.0.Alpha9]
    at org.jboss.deployers.vfs.plugins.classloader.VFSDeploymentClassLoaderPolicyModule.visit(VFSDeploymentClassLoaderPolicyModule.java:181) [:2.2.0.Alpha8]
    at org.jboss.scanning.plugins.DeploymentUnitScanner.scan(DeploymentUnitScanner.java:111) [:1.0.0.Alpha7]
    at org.jboss.scanning.spi.helpers.UrlScanner.scan(UrlScanner.java:96) [:1.0.0.Alpha7]
    at org.jboss.scanning.deployers.ScanningDeployer.deploy(ScanningDeployer.java:90) [:1.0.0.Alpha7]
    at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.Alpha8]
    ... 41 more


Have you tried "java2ParentDelegation=false"? Also you might find the below two useful

  1. jboss classloading usecases
  2. jee-j2ee-classloading-standard

Some links on fixing JAXB and JBOSS issues

  • http://kishantha.blogspot.com/2010/03/fixing-jaxb-linkageerror-in-jboss-with.html
  • https://issues.jboss.org/browse/JBWS-1931
  • http://community.jboss.org/wiki/LinkageErrorWithJBoss5Java6
  • http://community.jboss.org/message/568820


We use the following in ear-deployer-jboss-beans.xml

<bean name="EARClassLoaderDeployer" class="org.jboss.deployment.EarClassLoaderDeployer">    
  <property name="isolated">true</property>
</bean>
0

精彩评论

暂无评论...
验证码 换一张
取 消