我试图将我的应用程序与jboss类加载器隔离开来。
我已经在jboss-classloading.xml和jboss-web.xml中完成了设置并放入了我的WEBINF文件夹。
它解决了这个问题,但是开始遇到另一个问题,我继续搜索,可以看到解决方案是隔离应用程序。能否为这个问题提供解决方案..
我使用的是Jboss 5.1企业版。
请您告诉我下面的问题是什么。
我尝试了以下选项。
部署例外。
org.jboss.deployers.spi.DeploymentException:异常确定结构:AbstractVFSDeployment(SNAPSHOT.ear) 在org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) 在org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:85) 在org.jboss.deployers.plugins.main.MainDeployerImpl.determineStructure(MainDeployerImpl.java:1001) at org.jboss.deployers.plugins.main.MainDeployerImpl.determineDeploymentContext(MainDeployerImpl.java:437) 在org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:387) 在org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:297) 在org.jboss.system.server.profileservice.repository.MainDeployerAdapter.addDeployment(MainDeployerAdapter.java:86) 在org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:61) 在org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53) 在org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403) 在org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) 在org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652) 在org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938) 在org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082) 在org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988) 在org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778) 在org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543) at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308) 在org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)> 在org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461) 在org.jboss.Main.boot(Main.java:221) 在org.jboss.Main $ 1.run(Main.java:556) 在java.lang.Thread.run(Thread.java:680) 引起:java.lang.RuntimeException:确定结构时出错:SNAPSHOT.ear 在org.jboss.deployment.EARStructure.determineStructure(EARStructure.java:307) 在org.jboss.deployers.vfs.plugins.structure.StructureDeployerWrapper.determineStructure(StructureDeployerWrapper.java:73) at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.doDetermineStructure(VFSStructuralDeployersImpl.java:196) at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.determineStructure(VFSStructuralDeployersImpl.java:221) 在org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:77) ......还有21个 引起:org.jboss.deployers.spi.DeploymentException:确定结构时出错:SNAPSHOT.war 在org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) 在org.jboss.web.deployers.WARStructure.determineStructure(WARStructure.java:248) 在org.jboss.deployers.vfs.plugins.structure.StructureDeployerWrapper.determineStructure(StructureDeployerWrapper.java:73) at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.doDetermineStructure(VFSStructuralDeployersImpl.java:196) at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.determineStructure(VFSStructuralDeployersImpl.java:142) 在org.jboss.deployers.vfs.spi.structure.StructureContext.determineChildStructure(StructureContext.java:294) 在org.jboss.deployment.EARStructure.determineStructure(EARStructure.java:277) ......还有25个 引起:java.lang.RuntimeException:java.util.zip.ZipException:打开zip文件时出错 at org.jboss.virtual.plugins.context.AbstractExceptionHandler.handleZipEntriesInitException(AbstractExceptionHandler.java:39) at org.jboss.virtual.plugins.context.helpers.NamesExceptionHandler.handleZipEntriesInitException(NamesExceptionHandler.java:63) 在org.jboss.virtual.plugins.context.zip.ZipEntryContext.ensureEntries(ZipEntryContext.java:636) 在org.jboss.virtual.plugins.context.zip.ZipEntryContext.checkIfModified(ZipEntryContext.java:786) 在org.jboss.virtual.plugins.context.zip.ZipEntryContext.getChild(ZipEntryContext.java:830) 在org.jboss.virtual.plugins.context.zip.ZipEntryHandler.createChildHandler(ZipEntryHandler.java:195) 在org.jboss.virtual.plugins.context.AbstractVirtualFileHandler.structuredFindChild(AbstractVirtualFileHandler.java:690) 在org.jboss.virtual.plugins.context.zip.ZipEntryHandler.getChild(ZipEntryHandler.java:169) 在org.jboss.virtual.plugins 我尝试从应用程序中删除xerces。
你能告诉我如何识别应用程序正在加载哪个jar(我尝试运行classpath.sh)以及哪个jar正在创建冲突&调试此问题的最佳方法是什么。
Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl cannot be cast to javax.xml.parsers.SAXParserFactory
at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:128)
at com.sun.faces.config.ConfigureListener$WebXmlProcessor.getConfiguredFactory(ConfigureListener.java:702)
at com.sun.faces.config.ConfigureListener$WebXmlProcessor.scanForFacesServlet(ConfigureListener.java:674)
at com.sun.faces.config.ConfigureListener$WebXmlProcessor.<init>(ConfigureListener.java:648)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:156)
at org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureListener.java:60)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4389)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:321)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:145)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at com.sun.proxy.$Proxy38.start(Unknown Source)
添加了jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
<jboss-web>
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>com.example:archive=SNAPSHOT.ear
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
<context-root>/contextroot</context-root>
</jboss-web>
添加了jboss-classloading.xml
<classloading xmlns="urn:jboss:classloading:1.0"
name="SNAPSHOT.ear"
domain="myDomain"
parent-first="false"
parent-domain="DefaultDomain"
top-level-classloader="true"
export-all="NON_EMPTY"
import-all="false">
</classloading>