无法部署JAX-WS Web服务 - tomcat

时间:2014-06-17 13:41:54

标签: spring tomcat tomcat7 jax-ws

我在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

任何人都可以帮我找到我案件中究竟出现的问题吗?

1 个答案:

答案 0 :(得分:0)

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/