I am attempting to use JNDI with Jetty 7. My application runs successfully in Eclipse with the jetty-maven-plugin and Jetty version
7.0.1.v20091125. I am using jetty-env.xml and web-xml to configure my JNDI resources.
When I deploy this application to the same version of Jetty on a Linux server, I get a ClassNotFoundException (stack trace copied below).
In order to attempt to make this work, I have done the following:
- Created the webapps-plus folder
- Uncommented the section of jetty-plus.xml that sets up the webapps-plus folder for deployment
- Placed my WAR in webapps-plus
- Added webapps-plus.xml to the Jetty command line
- Verified that the “plus” jar is in the Jetty lib folder and that it contains the missing class
- Searched for the proper command line option, and tried a few options (including “All” and listing “plus”
separately). I also used java –jar start.jar –version to view the options, but “plus” is not in the list.
Here is my current command line:
java -Xms256M -Xmx1024M -XX:MaxPermSize=512m -DOPTIONS=All -Dnexpart.ps.config.location=/usr/local/etc/nexpart.ps -XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled -server -jar start.jar etc/jetty.xml etc/jetty-plus.xml 2>&1 >> /tmp/abc.out &
Can someone tell me how to get this to work?
java.lang.ClassNotFoundException: org.eclipse.jetty.plus.webapp.EnvConfiguration
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:90)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:70)
at org.eclipse.jetty.webapp.WebAppContext.loadConfigurations(WebAppContext.java:668)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:319)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:165)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:162)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:165)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:92)
at org.eclipse.jetty.server.Server.doStart(Server.java:228)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:990)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:955)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:394)
at org.eclipse.jetty.start.Main.start(Main.java:546)
at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:208)
at org.eclipse.jetty.start.Main.main(Main.java:75)