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

标签 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

任何人都可以帮我找出我的问题到底是什么吗?

最佳答案

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/

关于spring - 无法部署 JAX-WS Web 服务 - tomcat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24265444/

相关文章:

mysql - 直接从登陆页面单击“忘记密码”时出现错误“找不到网址”

java - 连接到 postgres Spring MVC 时出现 NullPointerException

java - JSTL、Tomcat6 -> Tomcat7 升级

authentication - Apache Tomcat SSL 问题

tomcat - 使用 Tomcat 的 Spring Stream 聚合应用程序

java - 每次 Catalina.out 收到异常时给我发邮件

tomcat - Struts2 约定插件在 Tomcat 8.x 上损坏 - org.apache.struts2.convention.PackageBasedActionConfigBuilder.error 无法扫描命名包

java - 无法解析 org.springframework.security.core.GrantedAuthority,即使它已下载/显示在项目库下

java - Spring相当于EJB Singleton来维护状态

java - 无法加载 org.springframework.web.servlet.DispatcherServlet