Thanks for the replies so far. Chuck; >> SEVERE: Allocate exception for servlet TempConvertWS >> java.lang.ClassNotFoundException: com.sun.xml.ws.transport.http.WSServlet > >Which usually means you have the requisite class located in more than one >place. Given the way you've been scattering jars all over, that's not >surprising. Each required .jar file >must be in only one place, not multiple.
I really only copied what the metro-on-tomcat.xml file does. There's a lot of blog posts about having to have the METRO jars in JAVA_HOME\jre\lib too due to JAVA 1.6 only shipping with JAX-WS 2.0 and METRO needs JAX-WS 2.1. I understand what you're saying and have stripped back the locations of the jar files to just CATALINA_HOME\lib and the problem still persists. I'm beginning to wonder if my Tomcat configuration is correct and there is a problem with the way that I created the JAX-WS artifacts using wsgen due to wsgen not using the correct version of JAX-WS... Chris; >Howard: are you sure that you need to put your libraries into Tomcat's >lib directories, etc. instead of just putting them all in your webapp's >WEB-INF/lib directory? Thats just what the metro-on-tomcat.xml file does so I assumed that was the correct procedure. From the replies I've got that may not be the case. >AFAIK, Tomcat does not provide any web services APIs so there shouldn't >be any conflicts. Try removing all of the libraries you added to the >CATALINA_HOME/lib and CATALINA_HOME/endorsed directories and removing >the "sever.loader" property from catalina.properties (not sure why you'd >need that, anyway). I actually got the adding METRO to the "server.loader" path from this blog post http://blogs.oracle.com/arungupta/entry/metro_on_tomcat_6_x, another blog I read suggested adding the METRO jars to the "shared.loader" property. And this one http://blog.theunical.com/webservers/tomcat/installation-and-configuration-of-jax-ws-metro-on-tomcat-6/ >All of your libraries should be in your webapp's WEB-INF/lib directory >only at that point. If you restart Tomcat in that configuration, what is >the result? I get the same result, Tomcat starts ok, initializes the METRO libs and WSServlet context listeners, then I get a ClassNotFoundException when browsing to the service's WSDL. There must be something incorrect with the way that I have created the webservice, as from what you've said there doesn't seem to be an extra configuration step that I have missed. Felix; >On http://metro.java.net/guide/Using_JAX_WS_2_1_with_JavaSE6.html the >metro guys advise to put jaxws-api.jar and jaxb-api.jar - and only those >- into the jre endorsed directory. That is necessary, since those api's >are part of the jre 6, but in older versions. > >So the possible duplicate class definitions could come from the fact, >that the older api comes with the jre. > >Regards >Felix Those 2 jars, jaxws-api.jar and jaxb-api.jar, are an endless source of confusion. As far as I can make out the web-services.api jar that ships with METRO actually contains the same classes as jaxws-api.jar and jaxb-api.jar. You can download those from JAX-WS section of the METRO site but if you download METRO itself then those jars are included in the web-services.api jar. Although I've been unable to find which jar actually contains the WSServlet class itself. This is only post I've found which actually mentions that "jaxws-api.jar and jaxb-api.jar = web-services.api jar" http://weblogs.java.net/blog/325/2009/04/03/tip-using-jax-ws-22-metro-20-tomcat-6x-jdk-6 Thanks Howard