Setting up Metro 2.0 with Jetty 7
- by trojanfoe
This question relates to a previous question of mine. I am attempting to set-up a low overhead Web Container using Jetty 7 that I can deploy Web Services using Metro 2.0. I have installed the following Metro 2.0 libs into jetty/lib:
webservices-extra-api.jar
webservices-extra.jar
webservices-rt.jar
webservices-tools.jar
And the following into a new jetty/lib/endorsed directory:
jsr173_api.jar
webservices-api.jar
I start Jetty with the following script (Windows) to ensure that jetty/lib/endorsed is part of the 'endorsed library path' and to ensure that Jetty adds the webservices jars to its classpath:
@echo off
set JETTY_HOME=C:\dev\jetty-7.1.0
set JAVA_OPTS=-Xmx1024m -XX:MaxPermSize=512m -Djetty.home=%JETTY_HOME% -Djava.endorsed.dirs=%JETTY_HOME%\lib\endorsed -Djetty.class.path=%JETTY_HOME%\lib\webservices-rt.jar;%JETTY_HOME%\lib\endorsed\webservices-api.jar -DSTOP.PORT=8079 -DSTOP.KEY=jettykey
pushd %JETTY_HOME%
java %JAVA_OPTS% -jar start.jar
popd
However when I deploy a WebServices war file (for example Metro sample 'pricequote'), I get the following exception:
java.lang.ClassNotFoundException: com.sun.xml.ws.transport.http.servlet.WSServletContextListener
Can anyone help me with this please? I suspect it's related to the order of classes in Jetty's classpath?