> Maybe I can reproduce the > NPE if I make a servlet that takes a long time to finish the request, > to see what was the original exception that has been suppressed by the > NPE.
OK, I was able to reproduce a NPE in TC 7.0.16 with a Servlet that calls "Thread.sleep(20000)", then make a request to that servlet and immediately redeploy that webapp. However, this time the NPE was not in StandardWrapperValve.invoke(), but in StandardContextValve.invoke(): 08.07.2011 00:26:40 org.apache.catalina.connector.CoyoteAdapter service SCHWERWIEGEND: An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:140) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) The lines around 172 in StandardContextValve are these: 166 // If the request was async at the start and an error occurred then 167 // the async error handling will kick-in and that will fire the 168 // request destroyed event *after* the error handling has taken 169 // place 170 if (!(request.isAsync() || (asyncAtStart && request.getAttribute( 171 RequestDispatcher.ERROR_EXCEPTION) != null))) { 172 context.fireRequestDestroyEvent(request); 173 } The problem here is that "context" is null (I debugged TC in Eclipse). However, this time it seems that it is not another Exception that has been suppressed by a NPE. I checked that the NPE in StandardContextValve.invoke() also occurs in Tomcat 7.0.18. Unfortunately, I was not able to reproduce the NPE in StandardWrapperValve.invoke(). Regards, Konstantin Preißer --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org