当前位置: 代码迷 >> Web前端 >> WebService runtime modeler error: Wrapper class XXX is not found. Have you run APT to generate them
  详细解决方案

WebService runtime modeler error: Wrapper class XXX is not found. Have you run APT to generate them

热度:1475   发布时间:2012-11-07 09:56:10.0
WebService runtime modeler error: Wrapper class XXX is not found. Have you run APT to generate them?

环境

MyEclipse 8.6 + JDK 1.6.31

问题

启动WebService项目出现如下异常:

 

严重: WSSERVLET11: failed to parse runtime descriptor: runtime modelererror: Wrapper class com.axt.service.jaxws.GetTimePoint is not found. Have yourun APT to generate them?
com.sun.xml.ws.model.RuntimeModelerException:runtime modeler error: Wrapper class com.axt.service.jaxws.GetTimePoint is notfound. Have you run APT to generate them?
         atcom.sun.xml.ws.model.RuntimeModeler.getClass(RuntimeModeler.java:285)
         atcom.sun.xml.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:596)
         atcom.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:543)
         atcom.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:370)
         atcom.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:256)
         atcom.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:322)
         atcom.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:188)
         atcom.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
         atcom.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:253)
         atcom.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147)
         atcom.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:108)
         atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
         atorg.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
         atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
         atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
         atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
         atorg.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
         atorg.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
         atorg.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
         atorg.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
         atorg.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
         atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
         atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
         atorg.apache.catalina.core.StandardHost.start(StandardHost.java:719)
         atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
         atorg.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         atorg.apache.catalina.core.StandardService.start(StandardService.java:516)
         atorg.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         atorg.apache.catalina.startup.Catalina.start(Catalina.java:578)
         atsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         atjava.lang.reflect.Method.invoke(Method.java:597)
         atorg.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         atorg.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2012-10-25 19:23:13org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instanceof class com.sun.xml.ws.transport.http.servlet.WSServletContextListener
com.sun.xml.ws.transport.http.servlet.WSServletException:WSSERVLET11: failed to parse runtime descriptor: runtime modeler error: Wrapperclass com.axt.service.jaxws.GetTimePoint is not found. Have you run APT togenerate them?
         atcom.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:118)
         atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
         atorg.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
         atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
         atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
         atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
         atorg.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
         atorg.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
         atorg.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
         atorg.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
         atorg.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
         atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
         atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
         atorg.apache.catalina.core.StandardHost.start(StandardHost.java:719)
         atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
         atorg.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         atorg.apache.catalina.core.StandardService.start(StandardService.java:516)
         atorg.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         atorg.apache.catalina.startup.Catalina.start(Catalina.java:578)
         atsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         atjava.lang.reflect.Method.invoke(Method.java:597)
         atorg.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         atorg.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by:com.sun.xml.ws.model.RuntimeModelerException: runtime modeler error: Wrapperclass com.axt.service.jaxws.GetTimePoint is not found. Have you run APT togenerate them?
         atcom.sun.xml.ws.model.RuntimeModeler.getClass(RuntimeModeler.java:285)
         atcom.sun.xml.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:596)
         atcom.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:543)
         atcom.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:370)
         atcom.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:256)
         atcom.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:322)
         atcom.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:188)
         atcom.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
         atcom.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:253)
         atcom.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147)
         atcom.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:108)
         ...24 more


 

原因

cxf需要jaxws-api-2.1.jar及jaxb-api-2.1.jar的支持。

 

解决办法

1.  检查项目里是否有上述相关Jar包,如果没有,将cxf所需的2.1的jar复制一份到jdk目录下的jre\lib\endorsed文件夹中。如果endorsed文件夹不存在,可新建。


2.  项目里是有上述相关Jar包,还需要在public class XXX类上方加入@SOAPBinding(style = SOAPBinding.Style.RPC);


3.  JDK升级到1.6.0.22版本以上;

 

 

参考资料

http://learning.iteye.com/blog/1213664

 

资料下载

jaxws-api-2.1-1.jar


jaxb-api-2.1.jar


  相关解决方案