2012-04-27 67 views
1

我們已經在使用RAD 7.5.0創建的EAR項目上實現了部署了一些使用axis2的webservices EAR部署在Websphere Application Server 7.0應用服務器上。我們在服務器上創建了一個共享庫,其中包括所有名爲CommonsJar的常用jar(包括commons-fileupload-1.2.jar)。在使用Tomcat Server 6.XX的單元測試中(僅部署WAR而不是整個EAR),該應用程序具有良好的功能在WAS 7.0上部署的EAR應用程序中調用axis2 webservice的異常

當應用程序部署在WAS 7.0中時發生問題:當我們將存根類該web客戶端witihin我們的Java EE客戶端WAS提供以下excepction:

[4/26/12 20:35:31:742 CDT] 00000026 SystemErr  R org.apache.axis2.deployment.DeploymentException: org.apache.commons.fileupload.FileUploadException 
[4/26/12 20:35:31:743 CDT] 00000026 SystemErr  R  at org.apache.axis2.deployment.AxisConfigBuilder.processMessageBuilders(AxisConfigBuilder.java:741) 
[4/26/12 20:35:31:743 CDT] 00000026 SystemErr  R  at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:202) 
[4/26/12 20:35:31:743 CDT] 00000026 SystemErr  R  at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:641) 
[4/26/12 20:35:31:744 CDT] 00000026 SystemErr  R  at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116) 
[4/26/12 20:35:31:744 CDT] 00000026 SystemErr  R  at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:68) 
[4/26/12 20:35:31:744 CDT] 00000026 SystemErr  R  at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:184) 
[4/26/12 20:35:31:744 CDT] 00000026 SystemErr  R  at com.mx.ing.wm.portal.dao.RestableceUsuarioPortalDAO.<init>(RestableceUsuarioPortalDAO.java:57) 
[4/26/12 20:35:31:744 CDT] 00000026 SystemErr  R  at com.mx.ing.wm.portal.blogic.RestableceUsuarioPortalFacade.consultaUsuarioRestablecer(RestableceUsuarioPortalFacade.java:16) 
[4/26/12 20:35:31:744 CDT] 00000026 SystemErr  R  at com.mx.ing.wm.portal.actions.RestableceUsuarioPortalAction.consultaUsuarioRestablecer(RestableceUsuarioPortalAction.java:188) 
[4/26/12 20:35:31:744 CDT] 00000026 SystemErr  R  at com.mx.ing.wm.portal.actions.RestableceUsuarioPortalAction.execute(RestableceUsuarioPortalAction.java:128) 
[4/26/12 20:35:31:744 CDT] 00000026 SystemErr  R  at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58) 
[4/26/12 20:35:31:744 CDT] 00000026 SystemErr  R  at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67) 
[4/26/12 20:35:31:744 CDT] 00000026 SystemErr  R  at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) 
[4/26/12 20:35:31:744 CDT] 00000026 SystemErr  R  at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191) 
[4/26/12 20:35:31:744 CDT] 00000026 SystemErr  R  at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305) 
[4/26/12 20:35:31:745 CDT] 00000026 SystemErr  R  at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191) 
[4/26/12 20:35:31:745 CDT] 00000026 SystemErr  R  at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) 
[4/26/12 20:35:31:745 CDT] 00000026 SystemErr  R  at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) 
[4/26/12 20:35:31:745 CDT] 00000026 SystemErr  R  at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) 
[4/26/12 20:35:31:745 CDT] 00000026 SystemErr  R  at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) 
[4/26/12 20:35:31:745 CDT] 00000026 SystemErr  R  at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) 
[4/26/12 20:35:31:745 CDT] 00000026 SystemErr  R  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657) 
[4/26/12 20:35:31:745 CDT] 00000026 SystemErr  R  at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939) 
[4/26/12 20:35:31:745 CDT] 00000026 SystemErr  R  at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502) 
[4/26/12 20:35:31:745 CDT] 00000026 SystemErr  R  at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179) 
[4/26/12 20:35:31:745 CDT] 00000026 SystemErr  R  at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91) 
[4/26/12 20:35:31:745 CDT] 00000026 SystemErr  R  at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864) 
[4/26/12 20:35:31:746 CDT] 00000026 SystemErr  R  at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592) 
[4/26/12 20:35:31:746 CDT] 00000026 SystemErr  R  at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) 
[4/26/12 20:35:31:746 CDT] 00000026 SystemErr  R  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) 
[4/26/12 20:35:31:746 CDT] 00000026 SystemErr  R  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) 
[4/26/12 20:35:31:746 CDT] 00000026 SystemErr  R  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) 
[4/26/12 20:35:31:746 CDT] 00000026 SystemErr  R  at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83) 
[4/26/12 20:35:31:746 CDT] 00000026 SystemErr  R  at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1784) 
[4/26/12 20:35:31:746 CDT] 00000026 SystemErr  R  at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) 
[4/26/12 20:35:31:746 CDT] 00000026 SystemErr  R  at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) 
[4/26/12 20:35:31:746 CDT] 00000026 SystemErr  R  at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) 
[4/26/12 20:35:31:746 CDT] 00000026 SystemErr  R  at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) 
[4/26/12 20:35:31:747 CDT] 00000026 SystemErr  R  at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) 
[4/26/12 20:35:31:747 CDT] 00000026 SystemErr  R  at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) 
[4/26/12 20:35:31:747 CDT] 00000026 SystemErr  R  at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) 
[4/26/12 20:35:31:747 CDT] 00000026 SystemErr  R  at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604) 
[4/26/12 20:35:31:747 CDT] 00000026 SystemErr  R Caused by: java.lang.NoClassDefFoundError: org.apache.commons.fileupload.FileUploadException 
[4/26/12 20:35:31:748 CDT] 00000026 SystemErr  R  at java.lang.J9VMInternals.verifyImpl(Native Method) 
[4/26/12 20:35:31:748 CDT] 00000026 SystemErr  R  at java.lang.J9VMInternals.verify(J9VMInternals.java:72) 
[4/26/12 20:35:31:748 CDT] 00000026 SystemErr  R  at java.lang.J9VMInternals.initialize(J9VMInternals.java:134) 
[4/26/12 20:35:31:748 CDT] 00000026 SystemErr  R  at java.lang.J9VMInternals.newInstanceImpl(Native Method) 
[4/26/12 20:35:31:748 CDT] 00000026 SystemErr  R  at java.lang.Class.newInstance(Class.java:1345) 
[4/26/12 20:35:31:748 CDT] 00000026 SystemErr  R  at org.apache.axis2.deployment.DescriptionBuilder.processMessageBuilders(DescriptionBuilder.java:230) 
[4/26/12 20:35:31:748 CDT] 00000026 SystemErr  R  at org.apache.axis2.deployment.AxisConfigBuilder.processMessageBuilders(AxisConfigBuilder.java:738) 
[4/26/12 20:35:31:748 CDT] 00000026 SystemErr  R  ... 41 more 
[4/26/12 20:35:31:748 CDT] 00000026 SystemErr  R Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileUploadException 
[4/26/12 20:35:31:749 CDT] 00000026 SystemErr  R  at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:76) 
[4/26/12 20:35:31:749 CDT] 00000026 SystemErr  R  at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:351) 
[4/26/12 20:35:31:749 CDT] 00000026 SystemErr  R  at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:347) 
[4/26/12 20:35:31:749 CDT] 00000026 SystemErr  R  at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83) 
[4/26/12 20:35:31:750 CDT] 00000026 SystemErr  R  at java.lang.ClassLoader.loadClass(ClassLoader.java:619) 
[4/26/12 20:35:31:750 CDT] 00000026 SystemErr  R  ... 48 more 

我們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_1335376658663"> <deployedObject xmi:type="appdeployment:ApplicationDeployment" xmi:id="ApplicationDeployment_1335376658663" startingWeight="10" warClassLoaderPolicy="SINGLE"> 
    <modules xmi:type="appdeployment:WebModuleDeployment" xmi:id="WebModuleDeployment_1335376658663" startingWeight="10000" uri="CallCenterWMWeb.war"/> 
    <modules xmi:type="appdeployment:WebModuleDeployment" xmi:id="WebModuleDeployment_1335376658664" startingWeight="10000" uri="OperacionesWMWeb.war"/> 
    <classloader xmi:id="Classloader_1335376658663" mode="PARENT_LAST"> 
     <libraries xmi:id="LibraryRef_1335376658663" libraryName="CommonsJar"/> 
    </classloader> </deployedObject> </appdeployment:Deployment> 

個JVM變量的服務器上的配置像這樣:

-Xquickstart -Xlp -Dclient.encoding.override=UTF-8 -agentlib:getClasses 

什麼是問題,任何想法?謝謝

回答

3

檢查這篇文章:

http://axis.apache.org/axis2/java/core/docs/app_server.html

查找在WebSphere節,也許你必須編輯axis2.xml配置和變更的放慢參數EnableChildFirstClassLoading爲「true」

+0

實際上,我們將我們的軸客戶端版本從1.4.2更新到1.5.6,修改了axis2.xml,我們在服務器端修改了類加載器屬性,並隔離了一些rendundante的jar。謝謝你,還要感謝@Davanum Srinivas – Yajairo87 2012-05-13 05:38:33

1

PARENT_LAST似乎只是針對您的部署XML中的CommonsJar,請嘗試從管理控制檯UI或使用此處提及的腳本將其切換爲所有Web應用程序 - Can I set the classloader policy for WebSphere in the ibm-web-bnd.xmi file?(請參閱部署的示例。 XML看起來在那裏爲好)

+0

@dims我修改了deployment.xml文件,就像它在發佈的示例中看起來一樣,但仍然具有相同的excepction,我不允許在WAS端編輯配置,還有其他建議嗎?謝謝 – Yajairo87 2012-04-30 19:43:47

相關問題