问题:项目中加入了Axis2的war包,当部署到websphere7.0版本上时,总是报:
[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
解决办法:经过网上的一番搜罗,从Apache的官网上找到了解决方案以及错误出现的原因(http://axis.apache.org/axis2/java/core/docs/app_server.html)
WebSphere
Avoiding conflicts with WebSphere's JAX-WS runtime
The JAX-WS runtime in WebSphere Application Server is based on a modified version of Axis2 and these classes are visible to application class loaders. This means that when deploying a standard version of Axis2 on WAS 7.0 (and WAS 6.1 with the Web Services
feature pack installed), special configuration is required to avoid conflicts with the Axis2 classes used internally by WebSphere. In particular it is necessary to change the class loader policy of the Web module to parent last. However, this is not sufficient
because Axis2 creates additional class loaders for modules and services, and these use parent first class loading by default. Therefore, two things must be done to make a standard Axis2 distribution work with WebSphere:
- Before deploying the Axis2 WAR, edit the axis2.xml file and set the
EnableChildFirstClassLoading parameter to true. Please note that this parameter is only supported in Axis2 1.5.5 or higher. The parameter is already present in the default
axis2.xml file included in the WAR distribution, but its value is set to
false. Therefore it is enough to change the parameter value.
- After deployment, modify the application configuration to enable parent last class loading for the Web module: in the WebSphere admin console, go the the configuration page for the enterprise application, click on
Manage Modules and locate the WAR containing Axis2 (in the default WAR distribution, the module is called
Apache-Axis2), then change the Class loader order option to
Classes loaded with local class loader first (parent last). Note that the class loader policy for the enterprise application itself (which can be specified under
Class loading and update detection) is irrelevant, unless a custom EAR distribution is used that includes the Axis2 libraries in the EAR instead of the WAR.
项目采用的Axis2的版本是1.4的,所以上面提到的第一条不适用,当按照第二条的办法处理后问题解决了(in the WebSphere admin console, go the the configuration page for the enterprise application, click on
Manage Modules and locate the WAR containing Axis2 (in the default WAR distribution, the module is called
Apache-Axis2), then change the Class loader order option to
Classes loaded with local class loader first (parent last))!
分享到:
相关推荐
NULL 博文链接:https://wxu.iteye.com/blog/268981
WebSphere_MQ_V7.0.1.3 安装目录下\java\doc;\java\lib;\java\lib64. 包含com.ibm.mq.jar,com.ibm.mq.jmqi.jar,com.ibm.mq.axis2.jar,com.ibm.mq.commonservices.jar等等
java开源,鄙视收分 by zero
将应用部署在weblogic中于axis2冲突的问题及解决方案
在websphere8.5 下部署含有CXFwebservice的war包无法正常启动,而相应的war包在tomcat上是可以正常启动的,通过后台的日志分析大致可以定位为相关的cxf类无法找到,其实这些类在项目的lib目录下都是存在的,莫名其妙...
使用Axis来开发Web services 需要准备 web 服务器,Axis API。本文使用的Web container 是Tomcat5.5, Axis API 采用版本2
利用Axis2实现WebService开发与部署-3中方法进行开发
对Eclipse4.3(Kepler server release2)版本配置Axis2-1.6.2,开发webservice服务接口,里面是自己配置过程中的总结和一些相关的插件压缩包,还有一份word文档是我操作的一些总结,希望对大家有所帮助。
axis2在实际应用中的比较广泛的一种部署方式。同我发布的hessina接口实例一样,也是比较简单的实例。可以直接下载运行
axis2-1.5.1-bin.zip axis2-1.5.1-war.zip webservice部署axis所需要是包
部署WebService(eclipse-axis2)部署WebService(eclipse-axis2)部署WebService(eclipse-axis2)部署WebService(eclipse-axis2)部署WebService(eclipse-axis2)
3、设置环境变量,加入AXIS2_HOME=Axis2客户端安装目录,path中追加;%AXIS2_HOME%\bin 4、打开cmd,执行命令 wsdl2java -uri ...
axis2c的在windows上的安装操作步骤
3、设置环境变量,加入AXIS2_HOME=<Axis2客户端安装目录>,path中追加;%AXIS2_HOME%\bin 4、打开cmd,执行命令 wsdl2java -uri ...
axis2 webservice 服务端jar包: -->axis2-kernel-1.6.1.jar -->axis2-spring-1.6.1.jar -->axis2-transport-http-1.6.1.jar -->XmlSchema-1.4.7.jar -->wsdl4j-1.6.2.jar -->axiom-api-1.2.12.jar -->axiom...
axis2例子 webservice axis2 示例axis2例子 webservice axis2 示例axis2例子 webservice axis2 示例axis2例子 webservice axis2 示例axis2例子 webservice axis2 示例
springboot集成axis2-1.7.9部署和调用实例
axis2-adb-1.5.4.jar axis2-adb-codegen-1.5.4.jar axis2-codegen-1.5.4.jar axis2-corba-1.5.4.jar axis2-fastinfoset-1.5.4.jar axis2-java2wsdl-1.5.4.jar axis2-jaxbri-1.5.4.jar axis2-jaxws-1.5.4.jar axis2-...
使用Axis2部署WebService,这是我的一点学习 笔记, 仅供初学者了解用,呵呵呵 不需要资源分的
本案例实现使用Axis2生成.arr包发布WebService服务,并使用Axis2生成客户端代码方式调用WebService