[Geoserver-devel] Issues with jetty:run and Jetty 7

Hi,
prompted by Jody's trubles with jetty:run this morning
I spent some time looking into the matter.

First result: I cannot reproduce problems with the current
setup. Just to make sure I wiped out org/mortbay from
my local maven repository and run mnv jetty:run
from web/app.
It worked just fine.

Anyways, since we're quite behind compared to Jetty
evolution I try to have a look at jetty 7 maven plugin
anyways with quite ugly results.
After the upgrade the startup fails with a rather
silly exception:
java.lang.ClassCastException: com.sun.media.jai.util.SunTileCache cannot be cast to com.sun.media.jai.util.SunTileCache

This looks like a classloading problem, as the class
is available at the same time in the JDK and in
jai_core, and I guess Jetty is loading both
of them using different class loaders.
Jetty 6 had some system property to control class loading,
but I cannot find an equivalent for Jetty 7.
If someone itches to investigate this further I've attached
a patch to upgrade the pom file to the new Jetty plugin.

Out of curiosity I also tried to download the full
Jetty 7.1.4 distribution and found another ugly
issue, just dropping geoserver.war into it won't make it
unpack, the OL preview at that point does not work
and Jetty complains it cannot find the openlayers
javascripts (silly, since they are in the war root
so they are meant to be served as static files,
no unpacking actually needed).

Well, spent enough time on this one already, but
things are not looking good for Jetty 7 :frowning:

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

(attachments)

jetty.patch (1.35 KB)