Community
Participate
Working Groups
Build Identifier: 6.1.26 Concurrently deploy hundreds of WARs onto a jetty server and you will eventually get the error: javax.naming.NamingException: This context is immutable; remaining name 'env' at org.mortbay.naming.NamingContext.createSubcontext(NamingContext.java:434) at org.mortbay.naming.NamingContext.createSubcontext(NamingContext.java:517) at org.mortbay.jetty.plus.webapp.EnvConfiguration.createEnvContext(EnvConfiguration.java:58) at org.mortbay.jetty.plus.webapp.EnvConfiguration.configureDefaults(EnvConfiguration.java:101) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1262) 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) Reproducible: Sometimes Steps to Reproduce: 1.Concurrently deploy hundreds of WARs onto a jetty server and you will eventually get the error. 2. 3.
Hi Alan, Are you deploying the same webapp hundreds of times, or are these all different webapps? Are you deploying statically by placing webapps into $JETTY_HOME/webapps, or are they (hot)deployed via the ContextDeployer, or are you deploying them in code (embedded)? What $JETTY_HOME/etc files are on your startup line? Do you have any extra jars over and above the ones from the distro in $JETTY_HOME/lib? Are there any other errors in the log? Finally, do you have a sample webapp that makes this error happen? thanks Jan
Hi Allen, Any further info???? Jan
Downgraded priority as no information provided.
(In reply to comment #1) > Hi Alan, > > Are you deploying the same webapp hundreds of times, or are these all different > webapps? Different webapps > Are you deploying statically by placing webapps into $JETTY_HOME/webapps, or > are they (hot)deployed via the ContextDeployer, or are you deploying them in > code (embedded)? Deploying in code > What $JETTY_HOME/etc files are on your startup line? None > > Do you have any extra jars over and above the ones from the distro in > $JETTY_HOME/lib? I have scrubbed our proprietary jars from the list: (linkedin)[acabrera-mn:backend-container 567]$ ls lib activation-1.0.2.jar commons-logging-1.1.jar jetty-util-6.1.26.jar servlet-api-2.5.jar ant-1.6.5.jar jetty-util5-6.1.26.jar spring-2.5.5.jar spring-webmvc-2.5.5.jar json-simple-1.1.jar jsp-2.1-6.1.1.jar jaxen-1.1.1.jar jsp-api-2.1-6.1.1.jar jdom-1.0.jar jetty-6.1.26.jar commons-beanutils-1.7.0.jar jetty-management-6.1.26.jar log4j-1.2.15.jar commons-cli-1.0.jar jetty-naming-6.1.26.jar mail-1.3.0.jar xml-apis-1.3.04.jar commons-lang-2.4.jar jetty-plus-6.1.26.jar mx4j-tools-3.0.2.jar > Are there any other errors in the log? none > Finally, do you have a sample webapp that makes this error happen? Other than the hundreds of proprietary WARs, I do not.
Alan, I believe this bug has been recently fixed in jetty-7 - see https://bugs.eclipse.org/bugs/show_bug.cgi?id=389956. If you truly are concurrently deploying webapps, then the value of ContextHandler.getCurrentContext() will change depending on what thread has just started to deploy a webapp. This then affects the jndi impl, which uses the current context to select which java:comp to use. I believe the fix I did in jetty-7 - to use the thread context classloader to determine which java:comp namespace to use - will solve this problem. I've applied it across to the jetty-6 codebase, so if you want to try it out, please checkout and build jetty-6. (Of course, better that you upgrade to jetty-7 if you can). Jan *** This bug has been marked as a duplicate of bug 389956 ***