如何在JBoss 6中分离ear classloader和系统类加载器? [英] How to separate ear classloader and system classloader in JBoss 6?

查看:111
本文介绍了如何在JBoss 6中分离ear classloader和系统类加载器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从JBoss 4.2.1升级到JBoss 6.在JBoss 4.2.1中,我们手动部署我们的应用程序作为爆炸性的战争,一切都运行得很好。

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.

我遇到了问题,因为我尝试部署的应用程序使用的版本比JBoss 6现在默认包含的版本要早。结果是我在整个地方都遇到了类加载器冲突,应用程序甚至无法启动。

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.

目前,我已尝试使用 JBoss类加载文档以及 jboss-classloading.xml 并没有取得任何成功。

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.VirtualFile.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


推荐答案

我们在 ear-deployer-jboss-beans.xml中使用以下内容

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

这篇关于如何在JBoss 6中分离ear classloader和系统类加载器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆