tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 47866] NullPointerException in embedded tomcat
Date Mon, 21 Sep 2009 11:58:41 GMT

--- Comment #3 from Dave Syer <> 2009-09-21 04:58:38 PDT ---
The problem is that if there is an exception in a ServletContextListener, then
Tomcat.start() fails to actually start the server and actually actively tries
to stop it, destroying the class loader in the process.  Any background threads
started by the listener before it failed can then fail in weird ways, for
instance throwing the exception reported above.

Two things you could do to make it more friendly if you feel like it: 1) throw
a more informative exception in the WebappClassLoader, 2) throw an exception
when Tomcat.start() encounters this kind of problem, and has already called

I see this in the log:

2009-09-21 12:56:19,658 ERROR main [org.apache.catalina.core.StandardContext] -
<Error listenerStart>
2009-09-21 12:56:19,658 ERROR main [org.apache.catalina.core.StandardContext] -
<Context [] startup failed due to previous errors>

But the exception that caused this is not propagated.  This is probably more
important than the original NPE.  DO you want to change the bug summary?

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message