On 19/02/2010 12:54, chinmaytotekar wrote:
Hi
I have a servlet and when i call reponse.getWriter().flushBuffer() OR
reponse.getWriter().println("SOME TEXT"), sometimes it gives following types
of errors. This error does not occur always but sometimes. What can be the
reason for this?
Last time I saw this, I think it turned out to be an application error.
The author had defined an HttpResponse object as a field in the Servlet.
Are either of the request or response cached in the session, or defined
as instance fields in the ControlServlet?
Can you post the code for the ControlServlet? (Don't do that, I don't
want to wade through 3482 lines of code - I'm just asking).
p
*********** ERROR ************
java.lang.NullPointerException
at
org.apache.tomcat.util.http.MimeHeaders.setValue(MimeHeaders.java:267)
at
org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1578)
at
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:944)
at org.apache.coyote.Response.action(Response.java:183)
at org.apache.coyote.Response.sendHeaders(Response.java:379)
at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:305)
at
org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:273)
at
org.apache.catalina.connector.CoyoteWriter.close(CoyoteWriter.java:108)
at
com.onmobile.platform.sovxml.ControlServlet.doGet(ControlServlet.java:3482)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:361)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org