Setting up Metro 2.0 with Jetty 7

Posted by trojanfoe on Stack Overflow See other posts from Stack Overflow or by trojanfoe
Published on 2010-05-19T09:28:09Z Indexed on 2010/05/19 9:30 UTC
Read the original article Hit count: 848

Filed under:

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:


And the following into a new jetty/lib/endorsed directory:


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

However when I deploy a WebServices war file (for example Metro sample 'pricequote'), I get the following exception:


Can anyone help me with this please? I suspect it's related to the order of classes in Jetty's classpath?

© Stack Overflow or respective owner

Related posts about jetty

Related posts about metro