On 18/02/2014 09:31, HU E wrote: <snip/>
> PRS0: Http response exception : java.lang.NullPointerException > org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:463) > org.apache.coyote.http11.InternalNioOutputBuffer.flushBuffer(InternalNioOutputBuffer.java:800) > org.apache.coyote.http11.InternalNioOutputBuffer.endRequest(InternalNioOutputBuffer.java:412) > org.apache.coyote.http11.Http11NioProcessor.action(Http11NioProcessor.java:1097) > org.apache.coyote.Response.action(Response.java:183) > org.apache.coyote.Response.finish(Response.java:305) > org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:284) > org.apache.catalina.connector.CoyoteWriter.close(CoyoteWriter.java:108) > .... > > The tomcat version is 6.0.35. <snip/> > So I guess socket is recycled after executing line 460 so that > NullPointException is thrown. But I am not sure why the socket is recycled. > Client closes the TCP connection? TCP write timeout? TCP is reset? It looks like there might be two threads trying to use the same socket at the same time - that shouldn't happen. It might be a Tomcat bug but a common cause is if the application retains a reference to the Response, the Writer or the OutputStream between requests - e.g. in the session or in a Filter. > I appreciate your help and thanks for your time in advance. The first thing to do is to carefully check your code for references being retained across requests that shouldn't be. Setting the system property org.apache.catalina.connector.RECYCLE_FACADES to true may help. For further advice, search the archives for the above system property and take a look at the related threads. If you are able to create a repeatable test case then please open a bug report and provide details of how to recreate this from a clean install of the latest stable 6.0.x release. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org