Mantis - Resin
Viewing Issue Advanced Details
4290 minor always 11-12-10 08:58 02-04-11 14:09
ferg  
ferg  
normal  
closed 4.0.10  
fixed  
none    
none 4.0.15  
0004290: Writer/OutputStream mixup
(rep by Mattias Jiderhamn)

Since upgrading to Resin 4.0.10 this error has turned up now and then in
our log files, however we have sofar been unable to reproduce it ourselves.
Could it be a Resin bug...?

java.lang.IllegalStateException: getWriter() can't be called after getOutputStream().
    at com.caucho.server.http.HttpServletResponseImpl.getWriter(HttpServletResponseImpl.java:166)
    at com.caucho.server.http.ToCharResponseAdapter$ToCharResponseStreamWrapper.writeNext(ToCharResponseAdapter.java:140)
    at com.caucho.server.http.ToCharResponseStream.flushCharBuffer(ToCharResponseStream.java:389)
    at com.caucho.server.http.ToCharResponseStream.flushBuffer(ToCharResponseStream.java:338)
    at com.caucho.server.http.ResponseAdapter.finish(ResponseAdapter.java:344)
    at com.caucho.jsp.PageContextImpl.release(PageContextImpl.java:1444)
    at com.caucho.jsp.PageManager.freePageContext(PageManager.java:217)
    at _jsp._html._orders._invoices._invoiceStatisticsList__jsp._jspService(_invoiceStatisticsList__jsp.java:45)
         ...


Notes
(0004850)
ferg   
11-17-10 09:47   
If we were, we should be able to reproduce it and it would turn up a lot more often in production. We've only seen it logged six times in three weeks.
(0005010)
mate   
01-31-11 00:31   
Any news on this? It's still happening a couple of times each week in production.
Just now another team member saw it on the console of his dev environment.
(0005011)
ferg   
01-31-11 10:33   
Haven't been able to reproduce this yet.

Any more detail on the scenario that triggers this would be very helpful: (forwards, filters, JSP/non-JSP, getOutputStream() vs JSP output, caching, etc.)
(0005012)
mate   
02-01-11 00:22   
This happens both with "pure" JSPs and JSPs forwarded to from servlets. There are a couple of filters.
What kind of caching are you thinking about?

I'll mail you some details on a specific case.
(0005023)
ferg   
02-04-11 14:09   
jsp/017o

The fixed case is with a JSP with a large buffer size and a sendRedirect.