tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47866] NullPointerException in embedded tomcat
Date Mon, 21 Sep 2009 11:58:41 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47866

--- Comment #3 from Dave Syer <david_syer@hotmail.com> 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
stop().  

I see this in the log:

{noformat}
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>
{noformat}

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: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message