You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Guillaume Mathe <gm...@smartinnov.com> on 2001/12/07 18:09:48 UTC

Not in FAQ: SocketException killing Tomcat 4.0.1...

Hi,

Here's the setup:
- Tomcat 4.0.1, windows 98SE or 2000/Server
- Direct servlet access from port 8080
- JDK/JRE 1.3.1 from Sun or JRE 1.3.0 from IBM, tested both
- Also compiled with JDK1.4
- Test servlet: a image/jpeg content-type servlet, using Sun's JPEG codec. Using a BufferedOutputStream.

Test procedure:
- Open a browser and call the servlet.
- BEFORE the servlet has finished encoding the JPEG, click on STOP, BACK, or a link going elsewhere.

Result:
- A SocketException: connection reset by peer shows up, as expected.
- The exception is thrown  by out.close() ('out' being the BufferedOutputStream given to the JpegEncoder) and is NOT catched by the servlet ! quite 
unexpected...
- Catalina dies, now that is unexpected ! Logs generally do not reflect the fatal exception.
- Under windows98SE it dies with a fatal error... 

My questions:
- Is it a known bug of Catalina ?
- If yes, has it been fixed in a recent build ?
- Can i trap this exception ? I want to handle properly client disconnects by closing resources and stopping SQL queries etc...

Regards,
Guillaume Mathe
Smartinnov


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>