Search |
||
Tip for using JAX-WS 2.2/ Metro 2.0 with Tomcat 6.x on JDK 6Posted by ramapulavarthi on April 3, 2009 at 4:24 PM PDT
If you trying to use JAX-WS 2.2 on top of JDK 6, you run into classloading problems. Resonating with the problems we had with using JAX-WS 2.1 on JDK 6 FCS?, Dejavu !!!. As you guessed, JDK 6 (U4 and later) has JAX-WS implementation with JAX-WS 2.1 API. If you try to use JAX-WS 2.2, the runtime always picks up the JAX-WS API from bootclasloader and will not see JAX-WS 2.2 API in your classpath. Well, the solution is the same, i.e, using the endorsed overriding mechanism. This has been documented and discussed before. But how do you configure for Web Services running on Tomcat 6 using JDK 6. Its easy with Tomcat 5.5, you just need to copy jaxws-api.jar and jaxb-api.jar into $TOMCAT_HOME/common/endorsed directory. But there are some changes in classloading in Tomcat 6.x and there is no documentation on the default endorsed directory. Here it is, you have to create endorsed directory in $TOMCAT_HOME and Copy jax-ws.api.jar and jaxb-api.jar from JAX-WS (webservices-api.jar in case of Metro) to $TOMCAT_HOME/endorsed. You might also find my other blog on running JAX-WS samples on Tomcat 6.x useful.
I am putting here one of the problems one would see when using JAX-WS 2.2 features without endorsed mechanism. For ex, if you are using AddressingFeature.Responses added in JAX-WS 2.2 API, you would get
»
Related Topics >>
Java Web Services and XML Comments
Comments are listed in date ascending order (oldest first)
Submitted by kratikagupta on Tue, 2009-08-11 23:52.
Hello Ramapulavarthi ,
For web service implementation I am using JDK1.6.06 with jax-ws2.1 on tomcat 6.
In that while calling web service from servlet I am getting following issues
1) in case of fault response
Could not initialize class com.sun.xml.internal.ws.fault.SOAPFaultBuilder
2) In case success response
Could not initialize class com.sun.xml.internal.ws.message.AttachmentUnmarshallerImpl
As you told I put all the web service lib in shard lib and updated its location in catilina.conf. Still I am facing issue.
is it releated to JVM or tomcat library?
Please provide your comment.
|
||
|
|