On startup, Jetty throws the following exception:
java.lang.ClassNotFoundException: org.eclipse.jetty.xml.XmlConfiguration
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:424)
at org.eclipse.jetty.start.Main.start(Main.java:602)
at org.eclipse.jetty.start.Main.main(Main.java:82)
ClassNotFound: org.eclipse.jetty.xml.XmlConfiguration
This is due to some problems that occur when Jetty is constructing its classpath. The root of the problem is revealed when you try to start Jetty with the --list-options command line switch.
27: 1.1 | $
{jetty.home}/lib/ext/liferay/activation.jar
28: private-2011/04/13-23:33:42 | ${jetty.home}
/lib/ext/liferay/hsql.jar
java.lang.NullPointerException
at org.eclipse.jetty.start.JarVersion.getMainManifestImplVersion(JarVersion.java:70)
at org.eclipse.jetty.start.JarVersion.getVersion(JarVersion.java:136)
at org.eclipse.jetty.start.Main.getVersion(Main.java:854)
at org.eclipse.jetty.start.Main.showAllOptionsWithVersions(Main.java:801)
at org.eclipse.jetty.start.Main.start(Main.java:531)
at org.eclipse.jetty.start.Main.main(Main.java:82)
By checking the source code, the Manifest that is being passed to JarVersion.getMainManifestImplVersion() is null. As this is retrieved from a JarFile object, checking the Javadocs for JarFile reveals that the Manifest object will be null if the manifest is missing.
http://docs.oracle.com/javase/1.5.0/docs/api/java/util/jar/JarFile.html#getManifest()
So basically, Jetty's code does not handle this edge case and in order to resolve the initial startup error, we need to find the JAR that is missing a MANIFEST.MF file and add that file to it. It turns out that the file that's missing the MANIFEST.MF is jta.jar and so to resolve the initial startup error, we add a MANIFEST.MF to that JAR to resolve the issue.
Hi Brian,
Guess it's solved for 6.1.1 GA2 too, isn't it? (it's committed to 6.1.x branch)