【问题标题】:Can't deploy JAX-WS web service - tomcat无法部署 JAX-WS Web 服务 - tomcat
【发布时间】:2014-06-17 13:41:54
【问题描述】:

我在 Eclipse 下使用 JAX-WS 注释创建了我的 Web 服务,当我使用 tomcat 7 服务器编译项目时,我收到以下错误:


juin 17, 2014 2:37:48 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
Infos: WSSERVLET12: JAX-WS context listener initializing
juin 17, 2014 2:37:48 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
Grave: WSSERVLET11: failed to parse runtime descriptor: class: ma.propar.FireApp.Metier.jaxws.Message could not be found
class: ma.propar.FireApp.Metier.jaxws.Message could not be found
    at com.sun.xml.ws.modeler.RuntimeModeler.getClass(RuntimeModeler.java:269)
    at com.sun.xml.ws.modeler.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:558)
    at com.sun.xml.ws.modeler.RuntimeModeler.processMethod(RuntimeModeler.java:505)
    at com.sun.xml.ws.modeler.RuntimeModeler.processClass(RuntimeModeler.java:353)
    at com.sun.xml.ws.modeler.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:249)
    at com.sun.xml.ws.server.RuntimeEndpointInfo.createModel(RuntimeEndpointInfo.java:180)
    at com.sun.xml.ws.server.RuntimeEndpointInfo.init(RuntimeEndpointInfo.java:326)
    at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.createModelAndMetadata(WSServletContextListener.java:203)
    at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:119)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)

juin 17, 2014 2:37:48 PM org.apache.catalina.core.StandardContext listenerStart
Grave: Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) com.sun.xml.ws.transport.http.servlet.WSServletContextListener
WSSERVLET11: failed to parse runtime descriptor: class: ma.propar.FireApp.Metier.jaxws.Message could not be found
    at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:130)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: class: ma.propar.FireApp.Metier.jaxws.Message could not be found
    at com.sun.xml.ws.modeler.RuntimeModeler.getClass(RuntimeModeler.java:269)
    at com.sun.xml.ws.modeler.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:558)
    at com.sun.xml.ws.modeler.RuntimeModeler.processMethod(RuntimeModeler.java:505)
    at com.sun.xml.ws.modeler.RuntimeModeler.processClass(RuntimeModeler.java:353)
    at com.sun.xml.ws.modeler.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:249)
    at com.sun.xml.ws.server.RuntimeEndpointInfo.createModel(RuntimeEndpointInfo.java:180)
    at com.sun.xml.ws.server.RuntimeEndpointInfo.init(RuntimeEndpointInfo.java:326)
    at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.createModelAndMetadata(WSServletContextListener.java:203)
    at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:119)
    ... 9 more

任何机构都可以帮我找出我的问题到底出在哪里吗?

【问题讨论】:

    标签: spring tomcat tomcat7 jax-ws


    【解决方案1】:

    Tomcat 不支持开箱即用的 JAX-WS。您必须将 JAX-WS 依赖项添加到 WEB-INF/lib 或 tomcat_home/lib 目录中。例如,请参考以下链接。

    http://www.mkyong.com/webservices/jax-ws/deploy-jax-ws-web-services-on-tomcat/

    【讨论】:

      猜你喜欢
      • 2010-12-16
      • 2015-05-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多