You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Leonard Gestrin <Le...@markettools.com> on 2009/04/17 20:14:37 UTC

solution RE: request.getSession() generates IllegalStateException in top filter(appears, response not being recycled properly if SocketException happenedfor it in the past)

I found a solution that seems to hold.

Instead of associating ImageWriter directly with response.outputstream, I create temporary ByteInputStream that is associated with javax.imageio.ImageWriter 

Once imagewriter is done, I am dumping ByteInputStream bytes to  response.outputsream.

My theory is that ImageWriter was hanging to outputstream longer than it supposed to 
And that was causing issues in "ClientAbortException" cases.

Thanks


-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sent: Thursday, April 16, 2009 9:45 AM
To: Tomcat Users List
Subject: RE: request.getSession() generates IllegalStateException in top filter(appears, response not being recycled properly if SocketException happenedfor it in the past)

> From: Leonard Gestrin [mailto:Leonard.Gestrin@markettools.com]
> Subject: request.getSession() generates IllegalStateException in top
> filter(appears, response not being recycled properly if SocketException
> happenedfor it in the past)
> 
> After a while, the same response object is being used by tomcat again,
> but as it gets to a first filter, I can see that it's already in
> commited state (response.isCommitted()==true)

It's not completely clear from your description whether the filter is part of the request that encountered the socket error or a different request.  If the former, the behavior you observe is expected; if the latter, you may be running into this bug, fixed over a year ago:
https://issues.apache.org/bugzilla/show_bug.cgi?id=30949

> This is tomcat apache-tomcat-5.5.20, JRE 15, WinXP.

What happens if you try it on a version that's not over 2.5 years old?

 - 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