Op woensdag, 17 augustus 2011 15:02 schreef Ronald Klop 
<ronald-mailingl...@base.nl>:

Op woensdag, 17 augustus 2011 14:28 schreef Mark Thomas <ma...@apache.org>:
 >
> > On 17/08/2011 13:20, Ronald Klop wrote:
 >  > Sometimes. Mostly I run ImageMagick in a separate process. But sometimes
 >  > it does things with javax.imagio.
 >  > I'm curious about the link between them. And what happened in 7.0.19
 >  > that triggers something new.
> > Details in the archives. > > If you have a simple test case that demonstrates the problem that
 >  doesn't use imageio then I'd be interested.
> > Mark > > ---------------------------------------------------------------------
 >  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 >  For additional commands, e-mail: users-h...@tomcat.apache.org
> > >
 >
> Ok. I read the FAQ mentioned by Konstantin and I understand it.
  My ImageIO always writes to a File and never directly to the 
ServletOutputStream..
  The communication between my servlet and the image resize module is a File. 
(Which I cache on the Tomcat node, so I only have to resize ones.)
  And I read some more archives, but they are about problems after reloading a 
Context, but I always restart my Tomcat nodes as I'm deploying new code and 
have only one Context.
  But I understand ImageIO can be troublesome.
And I'm also interested in a simple test case. :-) I'm trying to figure out how to reproduce this. Ronald.

Maybe this is of any interest from catalina.out on 7.0.19 with NIO.

Long before the first exception about a recylced response facade I get this:
Aug 15, 2011 10:55:07 AM org.apache.tomcat.util.net.NioEndpoint processSocket
SEVERE: Error allocating socket processor
java.lang.NullPointerException
    at 
org.apache.tomcat.util.net.NioEndpoint.processSocket(NioEndpoint.java:710)
    at 
org.apache.tomcat.util.net.NioEndpoint$Poller.processKey(NioEndpoint.java:1194)
    at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1130)
    at java.lang.Thread.run(Thread.java:662)

And some similar NPE's and a day later I get this:
Aug 16, 2011 9:00:29 AM 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler process
SEVERE: null
java.lang.NullPointerException
    at 
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.release(Http11NioProtocol.java:231)
    at 
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.release(Http11NioProtocol.java:150)
    at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:531)
    at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1544)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Aug 16, 2011 9:00:42 AM org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request 
processing
java.lang.NullPointerException
    at 
org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:227)
    at 
org.apache.coyote.http11.InternalNioOutputBuffer.commit(InternalNioOutputBuffer.java:218)
    at 
org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:698)
    at org.apache.coyote.Response.action(Response.java:170)
    at org.apache.coyote.Response.sendHeaders(Response.java:350)
    at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:317)
    at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:276)
    at org.apache.catalina.connector.Response.finishResponse(Response.java:501)
    at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:432)
    at 
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:313)
    at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
    at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1544)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Aug 16, 2011 9:00:42 AM org.apache.coyote.http11.AbstractHttp11Processor 
endRequest
SEVERE: Error finishing response
java.lang.NullPointerException
    at 
org.apache.coyote.http11.InternalNioOutputBuffer.flushBuffer(InternalNioOutputBuffer.java:252)
    at 
org.apache.coyote.http11.InternalNioOutputBuffer.endRequest(InternalNioOutputBuffer.java:144)
    at 
org.apache.coyote.http11.AbstractHttp11Processor.endRequest(AbstractHttp11Processor.java:1282)
    at 
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:356)
    at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
    at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1544)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
2011-08-16 09:01:22,674 ERROR [Tue Aug 16 09:01:20 CEST 2011 
/servlets/images/media.objectmedia/6705988 [request log id: 930312] ] 
MediaServlet: The response object has been recycled and is no longer associated 
with this facade
java.lang.IllegalStateException: The response object has been recycled and is 
no longer associated with this facade
    at 
org.apache.catalina.connector.ResponseFacade.isCommitted(ResponseFacade.java:325)
 ~[catalina.jar:7.0.19]
    at 
org.apache.catalina.connector.ResponseFacade.setContentType(ResponseFacade.java:237)
 ~[catalina.jar:7.0.19]

If I try the first failing request again. It doesn't fail. So it is not as easy 
as repeating a request. I haven't checked if this request uses ImageIO yet.

Ronald.

Reply via email to