You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mike Duffy <md...@yahoo.com> on 2009/05/26 20:22:21 UTC
CoyoteOutputStream OutputBuffer Problem
There may be a problem in org.apache.catalina.connector.CoyoteOutputStream at line 89
The OutputBuffer is null when trying to write to the response.
I have a servlet that is being used to write a png image for JFreeChart.
The servlet gets the output stream from the HttpServletResponse, writes, flushes, but does not close the output stream.
This servlet is called four times within the same JSP (there are four charts on the page).
I get the following stack trace. But it seems that all four charts and the page render correctly (although I cannot be 1005 sure because I am unable to check with all users).
Any suggestions?
Thx.
java.lang.NullPointerException
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:83)
at com.lasser.charting.servlets.SynchronizedOutputStream.write(SynchronizedOutputStream.java:31)
at com.lasser.charting.servlets.ChartViewer.doGet(ChartViewer.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: CoyoteOutputStream OutputBuffer Problem
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mike Duffy [mailto:mduffy_lists@yahoo.com]
> Subject: Re: CoyoteOutputStream OutputBuffer Problem
>
> The OutputBuffer is null when trying to write to the response.
The only time the OutputBuffer reference is cleared is when the Response object is recycled, and even then only if you're running with a SecurityManager. The easiest way to trap this might well be to drop some logging (or even print) statements into Tomcat code, particularly in the recycle() method of org.apache.catalina.connector.Response; dumping the call stack at that point would be very useful.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: CoyoteOutputStream OutputBuffer Problem
Posted by Mike Duffy <md...@yahoo.com>.
Tomcat 5.5.27
----- Original Message ----
From: "Caldarale, Charles R" <Ch...@unisys.com>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Tuesday, May 26, 2009 4:43:37 PM
Subject: RE: CoyoteOutputStream OutputBuffer Problem
> From: Mike Duffy [mailto:mduffy_lists@yahoo.com]
> Subject: CoyoteOutputStream OutputBuffer Problem
>
> There may be a problem in
> org.apache.catalina.connector.CoyoteOutputStream at line 89
There's an even bigger problem in not telling us the Tomcat version...
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: CoyoteOutputStream OutputBuffer Problem
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mike Duffy [mailto:mduffy_lists@yahoo.com]
> Subject: CoyoteOutputStream OutputBuffer Problem
>
> There may be a problem in
> org.apache.catalina.connector.CoyoteOutputStream at line 89
There's an even bigger problem in not telling us the Tomcat version...
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org