Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 7.0.0.pre5
-
Fix Version/s: None
-
Component/s: J2EE/Extra
-
Labels:None
-
Environment:Win32-XP
-
Number of attachments :
Description
Jetty-runner fails if the war to run embeds jetty-runner.jar as one of its libs with the following error:
java.lang.IllegalArgumentException: Object is not of type class org.mortbay.jetty.webapp.WebAppContext
The goal was to create a self-executable war file similarly to Hudson can be run (see the blog post at http://weblogs.java.net/blog/kohsuke/archive/2007/02/hudson_became_s.html and implementation at http://fisheye4.atlassian.com/browse/~raw,r=16013/hudson/trunk/hudson/extras/executable-war/src/main/java/Main.java) but instead of Winstone, use Jetty. However, if I include jetty-runner.jar with the war (so the main class in the war could extract it) it fails with an exception that looks like a classloader issue. If I don't include jetty-runner.jar in the war, the runner works as expected.
Could be related to http://jira.codehaus.org/browse/JETTY-518 - although it sounded like the intention of that issue was to add a goal to maven jetty plugin to create a distribution package (zip, tar) with start-up scripts (rather than make it possible to create self-executable war with Jetty).
Let me know if I could try some Jetty configuration options to work around the issue. If the issue is not clear, I can create a test case (but it failed the same way with any wars I locally tested with).
Kalle,
Do you mean that you get that exception when you try and execute the war, or if you use the war in a container? Can you attach a simple example of such a war?
thanks
Jan