ww128 / run-jetty-run

Automatically exported from code.google.com/p/run-jetty-run
0 stars 0 forks source link

Enabling JNDI Support prevents me from starting webapp in Jetty 6 and Jetty 7 #151

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What is the expected output? What do you see instead?
If I enable JNDI support, the application should be started with jetty-plus.xml 
classpath and still pick up my web.xml. However that does not happen, with JNDI 
nothing is found in Jetty 7, and in Jetty 6 a missing eclipse class prevents 
application startup.

What steps will reproduce the problem?
1. Run application without JNDI support -> web.xml is picked up
2. Enable JNDI checkmark in advanced options
3. Re-run application -> web.xml is no longer read (Jetty 7) or 
java.lang.ClassNotFoundException: org.eclipse.jetty.webapp.WebAppContext flies 
(Jetty 6)

What Eclipse version are you using ?
3.7.2

What Run-Jetty-Run version are you using?
1.3.3

What OS are you using ? 32bit or 64 bit?
32

Please provide any additional information below.

I am following the user guide which just tells me to enable JNDI, nothing more. 
I also tried to provide a jetty.xml, but that did not make a difference. The 
log output shows that a different configuration is meant to be used, however, 
the configuration seems not to work properly.

Running Jetty 7.6.2.v20120308
ParentLoaderPriority enabled
Context path:/OKSC-war
Enable config class:org.eclipse.jetty.webapp.WebInfConfiguration
Enable config class:org.eclipse.jetty.plus.webapp.EnvConfiguration
Enable config class:org.eclipse.jetty.plus.webapp.PlusConfiguration
Enable config class:org.eclipse.jetty.webapp.JettyWebXmlConfiguration
Enable config class:org.eclipse.jetty.webapp.TagLibConfiguration

With Jetty 6 when I enable JNDI, I get:
Running Jetty 6.1.26
2012-10-20 15:27:47.617:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
ParentLoaderPriority enabled
Context path:/OKSC-war
Enable config class:org.mortbay.jetty.webapp.WebInfConfiguration
Enable config class:org.mortbay.jetty.plus.webapp.EnvConfiguration
Enable config class:org.mortbay.jetty.plus.webapp.Configuration
Enable config class:org.mortbay.jetty.webapp.JettyWebXmlConfiguration
Enable config class:org.mortbay.jetty.webapp.TagLibConfiguration

but then later on, this Exception flies:

2012-10-20 15:27:48.367:WARN::Failed startup of context 
org.mortbay.jetty.webapp.WebAppContext@b988a6{/OKSC-war,C:\AZ_DATEN\workspaces\O
KSC-trunk\OKSC\OKSC-war\src\main\webapp}
java.lang.ClassNotFoundException: org.eclipse.jetty.webapp.WebAppContext
    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 org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:392)
    at runjettyrun.ProjectClassLoader.loadClass(ProjectClassLoader.java:89)
    at org.mortbay.util.Loader.loadClass(Loader.java:91)
    at org.mortbay.xml.XmlConfiguration.nodeClass(XmlConfiguration.java:224)
    at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:187)
    at org.mortbay.jetty.plus.webapp.EnvConfiguration.configureWebApp(EnvConfiguration.java:130)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1279)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:224)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at runjettyrun.Bootstrap.main(Bootstrap.java:97)
2012-10-20 15:27:48.445:INFO::Started SelectChannelConnector@0.0.0.0:8080

The mix of eclipse and mortbay package names is suspicious, it seems an eclipse 
Class sneaked into the Jetty 6 JNDI configuration.

Original issue reported on code.google.com by dietrich...@gmail.com on 20 Oct 2012 at 1:34