您好,我正在尝试让axis2在Websphere 7上工作,我在apache站点上进行了建议的配置(更改axis2.xml "EnableChildFirstClassLoading“参数,并将包含axis2的work模块的类加载器从"PARENT_FIST”更改为"PARENT_LAST“)
然而,在同一个EAR中,有另一个带有JSP和struts的web应用程序,在更改类加载器停止工作后(由于jar库版本问题),我的deployment.xml看起来类似于:
<?xml version="1.0" encoding="UTF-8"?>
<appdeployment:Deployment xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:appdeployment="http://www.ibm.com/websphere/appserver/schemas/5.0/appdeployment.xmi" xmi:id="Deployment_1335990730424">
<deployedObject xmi:type="appdeployment:ApplicationDeployment" xmi:id="ApplicationDeployment_1335990730424" startingWeight="10">
<modules xmi:type="appdeployment:WebModuleDeployment" xmi:id="WebModuleDeployment_1335990730424" startingWeight="10000" uri="StrutsWeb.war"/>
<modules xmi:type="appdeployment:WebModuleDeployment" xmi:id="WebModuleDeployment_1335990730425" startingWeight="10000" uri="Axis2Web.war" classloaderMode="PARENT_LAST"/>
<classloader xmi:id="Classloader_1335990730424" mode="PARENT_FIRST"/>
</deployedObject>
</appdeployment:Deployment>一旦我从axis2 web模块中删除了"PARENT_LAST“,struts模块就开始工作了,使用"PARENT_LAST”web服务可以完美地工作,但是struts web模块却不能。
提前谢谢你,
发布于 2012-05-03 06:15:18
在WebSphere应用服务器(像几乎所有的应用服务器一样)中,有一个类加载器的层次结构:
Application server class loaders
| Includes WAS_HOME/plugins, WAS_HOME/lib, etc.
|
+-- Application class loader
| Includes files in lib/ folder of the .ear
| Includes all JARs referenced from Class-Path in all .war
|
+-- StrutsWeb.war class loader
| Includes WEB-INF/classes and all JARs in WEB-INF/lib
|
+-- Axis2Web.war
Includes WEB-INF/classes and all JARs in WEB-INF/lib配置片段中的<classloader>元素嵌套在ApplicationDeployment中,因此它对应于应用程序类加载器。您可能不想修改这个元素,您可能想要修改各个WAR模块的委托模式。但是,如果更改此设置会产生影响,那么您可能在应用程序类加载器类路径上有WAR,该路径实际上应该在WAR模块的WEB-INF/lib中。
https://stackoverflow.com/questions/10421812
复制相似问题