问题描述
websphere7下发布axis2webservice后访问WSDL的异常如下(在weblogic下可以正常访问):[16-1-2219:42:51:398CST]00000016webappEcom.ibm.ws.webcontainer.webapp.WebApplogServletErrorSRVE0293E:[Servlet错误]-[reinsACIC_axis2Servlet]:org.apache.axis2.deployment.DeploymentException:org.apache.commons.fileupload.FileUploadExceptionatorg.apache.axis2.deployment.AxisConfigBuilder.processMessageBuilders(AxisConfigBuilder.java:741)atorg.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:202)atorg.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:641)atorg.apache.axis2.deployment.WarBasedAxisConfigurator.<init>(WarBasedAxisConfigurator.java:157)atorg.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:519)atorg.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:437)atcom.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:325)atcom.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:165)atcom.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:628)atcom.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)atcom.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)atcom.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3610)atcom.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:274)atcom.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:926)atcom.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)atcom.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)atcom.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)atcom.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)atcom.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)atcom.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)atcom.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)atcom.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)atcom.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)atcom.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)atcom.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)atcom.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)atcom.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)atcom.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)atcom.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)Causedby:java.lang.NoClassDefFoundError:org.apache.commons.fileupload.FileUploadExceptionatjava.lang.J9VMInternals.verifyImpl(NativeMethod)atjava.lang.J9VMInternals.verify(J9VMInternals.java:72)atjava.lang.J9VMInternals.initialize(J9VMInternals.java:134)atjava.lang.J9VMInternals.newInstanceImpl(NativeMethod)atjava.lang.Class.newInstance(Class.java:1325)atorg.apache.axis2.deployment.DescriptionBuilder.processMessageBuilders(DescriptionBuilder.java:230)atorg.apache.axis2.deployment.AxisConfigBuilder.processMessageBuilders(AxisConfigBuilder.java:738)...28moreCausedby:java.lang.ClassNotFoundException:org.apache.commons.fileupload.FileUploadExceptionatjava.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:76)atorg.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:402)atorg.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:347)atorg.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)atjava.lang.ClassLoader.loadClass(ClassLoader.java:609)...35more生产环境的WAS版本是7.0.0.37,测试环境的WAS版本是7.0.0.0,webservice是axis21.4.4目前查到的原因是JAR包冲突,在测试环境上将/app/IBM/WebSphere/AppServer/plugins/org.apache.axis2.jar删掉以后就可以正常打开WSDL但在生产环境上使用此方法后,会导致WAS无法启动.目前已经尝试过的方法:---------------------------------------------------------------------------------http://blog.sina.com.cn/s/blog_71420de90102v8e8.html先将webservice是axis2更换到1.5.61,将应用程序的axis2.xml中的EnableChildFirstClassLoading参数设为true(Axis21.5.6或者更高版本)。2,WAS控制台,设置企业应用程序(部署的应用)-》类装入和更新检测-》类装入器顺序-》选择“类已装入并且是先使用本地类装入器(父类最后)”。3,WAS控制台,设置WASserverJVM的自定义参数:服务器(server1)-》Java和进程管理—》进程定义-》Java虚拟机-》定制属性-》新建com.ibmcom.ibm.websphere.webservices.DisableIBMJAXWSEngine为true对于解决JAR包冲突比较通用,应该要重启一下服务器吧,问题解决。如果没有解决,第2步做的时候,选择应用程序,点击进入后,点管理模块(之前是选了类装入和更新检测),点击对应的模块进入,即可看到最下面要修改的类加载级别,重启服务器。将1,2,3步做完以后问题依旧,如果在管理模块中配置了类加载顺序,则启动应用后无法访问应用,报出工程中其它jar包访问的问题[16-1-2220:00:32:486CST]0000001cwebappEcom.ibm.ws.webcontainer.webapp.WebApplogErrorSRVE0293E:[Servlet错误]-[com.sinosoft.sysframework.web.control.SetCharacterEncodingFilterincompatiblewithjavax.servlet.Filter]:java.lang.ClassCastException:com.sinosoft.sysframework.web.control.SetCharacterEncodingFilterincompatiblewithjavax.servlet.Filter---------------------------------------------------------------------------------将工程下WEB-INFmodules下的所有mar文件重命名为jar,复制到WEB-INFlib下问题依旧---------------------------------------------------------------------------------http://wenku.baidu.com/link?url=0FdHA6Aon73hVW2xTtGlSUZoKi00-Plbh-x6h2rJZYF4bcCKqzdVFh6WesUaXOi7tF6NiM_LWXYG1lQVFdnbuD_B9iKDQ_BGf1sOSKTvo87使用共享库的方法,将工程中的axis2-adb-1.5.6.jar添加到共享库中,并在发布的应用程序中添加问题依旧---------------------------------------------------------------------------------Applicationservers>server1>Classloadingmode配置为父类最后问题依旧---------------------------------------------------------------------------------上面几种方法我使用axis21.4.4和axis21.5.6都试过,最后的结果都是一样的.目前是在生产环境上临时使用websphere7.0.0.0版本,使用删掉jar包的方法发布了工程.但此问题始终需要解决.已经查了很久,尝试了各种方法,仍然没有解决这个问题,有没有大神解决过这类问题,还望赐教,小弟不胜感激!
解决方案
解决方案二:
我也遇到了,不知楼主解决了吗?后来用了什么方法?
解决方案三:
尝试过几个方法:修改MAINFEST.MF文件替换jar包版本修改was的类加载顺序但都没什么效果
解决方案四:
楼上的两位,问题还没有解决。找我们领导协调资源了。另外问题描述有误,更正一下。axis2版本是axis21.4.1,不是axis21.4.4
解决方案五:
楼主问题解决了吗