Axis2 1.3和WebSphere 8.5兼容性。 [AxisServlet]:java.lang.NoClassDefFoundError:org.apache.woden.resolver.URIResolver

时间:2016-01-26 10:25:42

标签: web-services java-ee websphere axis2 websphere-8

我有一个应用程序从Java 5迁移到Java 7和Websphere 6到8.5。

此应用程序具有通过AXIS2 1.3开发的一些Web服务。

在Websphere中启动时,耳朵会给我这个错误。

[] 00000088 WarBasedAxisC I org.apache.axis2.deployment.WarBasedAxisConfigurator <init> Could not find axis2.xml, loading default org/apache/axis2/deployment/axis2_default.xml from classpath
[] 00000088 DeploymentEng I org.apache.axis2.deployment.DeploymentEngine prepareRepository No modules directory was found under /apps/WebSphere85/profiles/node/installedApps/s00va9943461Network/NAME.ear/a_NAME.war/WEB-INF.
[] 00000088 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper init Uncaught.init.exception.thrown.by.servlet
[] 00000088 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /apps/WebSphere85/profiles/node/logs/ffdc/sa-iNAME-biz-1_83a50d9f_15.12.22_13.03.50.8155934160160475396565.txt com.ibm.ws.webcontainer.servlet.ServletWrapperImpl 272
[] 00000088 WarBasedAxisC I org.apache.axis2.deployment.WarBasedAxisConfigurator <init> Could not find axis2.xml, loading default org/apache/axis2/deployment/axis2_default.xml from classpath
[] 00000088 DeploymentEng I org.apache.axis2.deployment.DeploymentEngine prepareRepository No modules directory was found under /apps/WebSphere85/profiles/node/installedApps/s00va9943461Network/NAME.ear/a_NAME.war/WEB-INF.
[] 00000088 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper init Uncaught.init.exception.thrown.by.servlet
[] 00000088 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /apps/WebSphere85/profiles/node/logs/ffdc/sa-iNAME-biz-1_83a50d9f_15.12.22_13.03.50.8778098661991316840273.txt com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter 82
[] 00000088 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /apps/WebSphere85/profiles/node/logs/ffdc/sa-iNAME-biz-1_83a50d9f_15.12.22_13.03.50.8947148831197547706091.txt com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters -SE 1078
[] 00000088 webapp        E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[AxisServlet]: java.lang.NoClassDefFoundError: org.apache.woden.resolver.URIResolver
        at java.lang.J9VMInternals.verifyImpl(Native Method)
            at java.lang.J9VMInternals.verify(J9VMInternals.java:93)
            at java.lang.J9VMInternals.initialize(J9VMInternals.java:170)
            at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:62)
            at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
            at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:815)
            at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
            at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:391)
            at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
            at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:144)
            at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:283)
            at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95)
            at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:569)
            at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:457)
            at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:342)
            at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:168)
            at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:634)
            at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
            at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
            at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
            at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:79)
            at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967)
            at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
            at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3923)
            at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
            at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:986)
            at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
            at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
            at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
            at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
            at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
            at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:287)
            at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
            at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
            at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
            at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
            at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
            at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
            at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
            at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
            at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
            at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
    Caused by: java.lang.ClassNotFoundException: org.apache.woden.resolver.URIResolver
            at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
            at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
            at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
            at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:703)
            ... 42 more

我尝试了什么:

  • 在WebSphere
  • 中设置父最后一个参数
  • 重建ear和webservices
  • 服务部署在was6上(显然应用程序无法运行,因为was6不支持java 7)
  • Tomcat运行战争没有任何问题。

可能在websphere中配置了JAX-WS / AXIS2 1.3对于websphere 8.5是否正确?我认为这与axis2版本有关,因为这个错误发生在[Axis Servlet]中。

我是Websphere的新手,但我有必要努力工作,谢谢你的帮助。

Mine deployement.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_1449152598274">
  <deployedObject xmi:type="appdeployment:ApplicationDeployment" xmi:id="ApplicationDeployment_1449152598274" deploymentId="0" startingWeight="1" binariesURL="$(APP_INSTALL_ROOT)/s0000000001Network/App_NAME.ear" useMetadataFromBinaries="false" enableDistribution="true" createMBeansForResources="true" reloadEnabled="false" appContextIDForSecurity="href:s00000000001Network/App_NAME" filePermission=".*\.dll=755#.*\.so=755#.*\.a=755#.*\.sl=755" allowDispatchRemoteInclude="false" allowServiceRemoteInclude="false" asyncRequestDispatchType="DISABLED" standaloneModule="false" enableClientModule="false">
    <targetMappings xmi:id="DeploymentTargetMapping_1449152598274" enable="true" target="ServerTarget_1449152598274"/>
    <targetMappings xmi:id="DeploymentTargetMapping_1449152598275" enable="true" target="ServerTarget_1449152598275"/>
    <classloader xmi:id="Classloader_1449152598274" mode="PARENT_FIRST"/>
    <modules xmi:type="appdeployment:WebModuleDeployment" xmi:id="WebModuleDeployment_1449152598274" deploymentId="1" startingWeight="10000" uri="APP_NAME.war" containsEJBContent="0">
      <targetMappings xmi:id="DeploymentTargetMapping_1449152598276" target="ServerTarget_1449152598274"/>
      <targetMappings xmi:id="DeploymentTargetMapping_1449152598277" target="ServerTarget_1449152598275"/>
      <classloader xmi:id="Classloader_1449152598275"/>
    </modules>
    <properties xmi:id="Property_1449152598274" name="metadata.complete" value="true"/>
  </deployedObject>
  <deploymentTargets xmi:type="appdeployment:ServerTarget" xmi:id="ServerTarget_1449152598274" name="sa-App_NAME-biz-1" nodeName="s00000000001"/>
  <deploymentTargets xmi:type="appdeployment:ServerTarget" xmi:id="ServerTarget_1449152598275" name="sw-App_NAME-biz-1" nodeName="s00000000001"/>
</appdeployment:Deployment>

Class Loader correctly setted

1 个答案:

答案 0 :(得分:3)

如果要将axis2引擎与应用程序捆绑在一起,则必须禁用WebSphere JAX-WS运行时。你需要:

  • 将您的网络模块配置为PARENT LAST类加载器
  • 在WAR文件的DisableIBMJAXWSEngine: true中设置META-INF/MANIFEST.MF

或者迁移您的应用程序以使用WAS 8.5.5(支持JAX-WS)提供的Web服务引擎。

有关详情,请查看 - Using a third-party JAX-WS web services engine