aspose file tools*
The moose likes Web Services and the fly likes Deploying webservices war file on Apache tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Deploying webservices war file on Apache tomcat" Watch "Deploying webservices war file on Apache tomcat" New topic
Author

Deploying webservices war file on Apache tomcat

Nageswar Kakolla
Ranch Hand

Joined: Jan 16, 2006
Posts: 71
Hi,

I am deploying webservices war file on Aapche tomcat. I got cleared of issues, Handler,setting up sun-jaxws.xml etc. war.

apache 6.x version which uses JDK 1.6 and also, war file is also compiled using JDK 1.6. war files consists of WSDL, Handlers etc. web.xml has context listener as well.

following seems, getPolicyMap() method is called and when I checked WSEndPoint.java which is abstract class does not have getPolicyMap() method ?

Appreciate any help?

SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.NoSuchMethodE
rror: com.sun.xml.ws.api.server.WSEndpoint.getPolicyMap()Lcom/sun/xml/ws/policy/
PolicyMap;
java.lang.NoSuchMethodError: com.sun.xml.ws.api.server.WSEndpoint.getPolicyMap()
Lcom/sun/xml/ws/policy/PolicyMap;
at com.sun.xml.ws.assembler.ServerTubelineAssemblyContext.<init>(ServerT
ubelineAssemblyContext.java:67)
at com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl$MetroTubelineAs
sembler.createServer(TubelineAssemblerFactoryImpl.java:108)
at com.sun.xml.ws.server.WSEndpointImpl.<init>(WSEndpointImpl.java:152)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.
java:217)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapter
s(DeploymentDescriptorParser.java:253)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(Deploy
mentDescriptorParser.java:147)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contex
tInitialized(WSServletContextListener.java:108)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
429)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:
1249)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServl
et.java:612)
at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServl
et.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF

web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
<web-app>
<listener>
<listener-class>
com.sun.xml.ws.transport.http.servlet.WSServletContextListener
</listener-class>
</listener>
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>
com.sun.xml.ws.transport.http.servlet.WSServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/real/HelloWorld</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout>
</session-config>
</web-app>

sun-jaxws.xml


<endpoints xmlns='http://java.sun.com/xml/ns/jax-ws/ri/runtime' version='2.0'>
<endpoint
name='HelloWorld'
implementation='com.company.services.real.HelloWorld'
wsdl="WEB-INF/wsdl/HelloWorld"
url-pattern='/HelloWorld'>
<javaee:handler-chains xmlns:javaee="http://java.sun.com/xml/ns/javaee">
<javaee:handler-chain>
<javaee:handler>
<javaee:handler-class>com.company.services.real.handler.HelloWorldHandler
</javaee:handler-class>
</javaee:handler>
</javaee:handler-chain>
</javaee:handler-chains>
</endpoint>
</endpoints>

Nageswar Kakolla
Ranch Hand

Joined: Jan 16, 2006
Posts: 71

I resolved the issue by copying latest JAXWS2.1 of webservices-rt.jar in tomcat lib and WEBAPPS\*\lib directory but now i am getting similar NoSuchMethodError,. there was some explanation somewhere like JAVA might be reading Webservice related from its own lib rather new WS provided in tomcat lib. put all relevatn libraries in endorsed so i copied in jdk endorsed but no luck.

SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.NoSuchMethod
rror: com.sun.xml.ws.api.pipe.ServerPipeAssemblerContext.createValidationPipe(L
om/sun/xml/ws/api/pipe/Pipe;)Lcom/sun/xml/ws/api/pipe/Pipe;
java.lang.NoSuchMethodError: com.sun.xml.ws.api.pipe.ServerPipeAssemblerContext
createValidationPipe(Lcom/sun/xml/ws/api/pipe/Pipe;)Lcom/sun/xml/ws/api/pipe/Pi
e;
at com.sun.xml.ws.assembler.PipelineAssemblerFactoryImpl$WsitPipelineAs
embler.createServer(PipelineAssemblerFactoryImpl.java:305)
at com.sun.xml.ws.api.pipe.TubelineAssemblerFactory$TubelineAssemblerAd
pter.createServer(TubelineAssemblerFactory.java:140)
at com.sun.xml.ws.server.WSEndpointImpl.<init>(WSEndpointImpl.java:152)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory
java:217)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapte
s(DeploymentDescriptorParser.java:253)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(Deplo
mentDescriptorParser.java:147)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.conte
tInitialized(WSServletContextListener.java:108)
at org.apache.catalina.core.StandardContext.listenerStart(StandardConte
t.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:
429)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java
 
Don't get me started about those stupid light bulbs.
 
subject: Deploying webservices war file on Apache tomcat