aspose file tools*
The moose likes JSF and the fly likes Possible causes and fixes for ClientAbortException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Possible causes and fixes for ClientAbortException" Watch "Possible causes and fixes for ClientAbortException" New topic
Author

Possible causes and fixes for ClientAbortException

Boris Golman
Ranch Hand

Joined: Apr 24, 2008
Posts: 31
Hello, everyone. I have a question, which is more like gathering opinions. I have a java code that renders PDF document, based on the XML instance I generate. Everything works fine, and the document is rendered properly on the web page, except that one time (and it happened only once, it seems), document rendering failed, giving me this error:

ClientAbortException: java.io.IOException
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:352)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:83)

which happened, when the code was already writing the byte array into an OutputStream. From what I gathered, it could happen when the internet connection goes down, or uploading process fails to respond. I would like to know, if there are any other reasons for that exception to occur, given that it has worked before and it works now. And what be the best solution or a workaround to prevent this from happening? Is exception handling my only option? I just want to see if anyone else had this problem, especially while rendering a PDF document of a web page, and if there is a way to bypass it somehow.

Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Possible causes and fixes for ClientAbortException