1

在部署 JAX-WS 时,我在 Websphere 7(Fix Pack 17)中面临以下问题。我已经webservices-api-2.0.1.jar/jaxws-api-2.2.11.jar在 Websphere 中设置了类路径。除此之外,我还尝试通过更改父类加载器策略[Classes loaded with application class loader first ]..请帮助..

Error Description :

00000009 http E WSSERVLET11: failed to parse runtime descriptor: java.lang.NoSuchMethodError: javax/xml/ws/WebFault.messageName()Ljava/lang/String;
java.lang.NoSuchMethodError: javax/xml/ws/WebFault.messageName()Ljava/lang/String;
at com.sun.xml.ws.model.RuntimeModeler.processExceptions(RuntimeModeler.java:1262)
at com.sun.xml.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:982)
at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:744)
at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:504)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:335)
at com.sun.xml.ws.db.DatabindingImpl.<init>(DatabindingImpl.java:100)
at com.sun.xml.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:74)
at com.sun.xml.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:58)
at com.sun.xml.ws.db.DatabindingFactoryImpl.createRuntime(DatabindingFactoryImpl.java:127) at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:487)
at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:283)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:158)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:577)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:560)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:303)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:179)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:131)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:152)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1707)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:380)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:299)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:100)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:166)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:731)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:616)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:376)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:668)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1123)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1319)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:610)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:944)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:726)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2048)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:441)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:384)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$300(CompositionUnitMgrImpl.java:112)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:951)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
------------------------------------------------------------------------
4

1 回答 1

0

WebSphere 7.x 支持 JAX-WS 2.0。您正在尝试使用 JAX-WS 2.2。

您应该做的第一件事是从 WebSphere 目录中删除这两个 JAR 文件。将您自己的自定义 JAR 文件放在 WebSphere 的安装目录中通常是一个坏主意 - WebSphere 提供了自己的机制来将 JAR 添加到服务器的运行时。

如果您可以满足于 JAX-WS 2.0 - 总的来说,这是我推荐的;WebSphere 不喜欢让人们乱搞它支持的规范级别——那么您应该从您的系统中完全删除这两个 JAR 文件,这样就可以正常工作了。

如果您坚持使用 JAX-WS 2.2,那么您一定是一个勇敢的人。将这两个 JAR 文件放在您的 EAR 中,将 EAR 的类加载策略设置为 PARENT_LAST,然后从那里开始工作。

于 2014-05-22T00:28:00.270 回答