Clientabortexception. Socket Write Error problem

Source: Internet
Author: User

When developing web PDF printing Today, the servlet encounters a problem when writing data to the client:

Caused by: clientabortexception:  java.net.socketexception: software caused  connection abort: socket write errorat  Org.apache.catalina.connector.OutputBuffer.realWriteBytes (outputbuffer.java:406) at  Org.apache.tomcat.util.buf.ByteChunk.flushBuffer (bytechunk.java:480) at  Org.apache.tomcat.util.buf.ByteChunk.append (bytechunk.java:310) at  Org.apache.catalina.connector.OutputBuffer.writeByte (outputbuffer.java:450) at  Org.apache.catalina.connector.CoyoteOutputStream.write (coyoteoutputstream.java:77) at  Com.cnpc.print.PrintServlet.doPost (printservlet.java:83) ... 25 morecaused by:  java.net.socketexception: software caused connection abort: socket write  Errorat java.net.socketoutputstream.socketwrite0 (Native method) at  Java.net.SocketOutputStream.socketWrite (socketoutputstream.java:113) At java.net.socketoutputstream.write ( Socketoutputstream.java:159) at org.apache.coyote.http11.internaloutputbuffer.realwritebytes (InternalOutputBuffer.java:215) at  org.apache.tomcat.util.buf.bytechunk.flushbuffer (bytechunk.java:480) at  Org.apache.tomcat.util.buf.ByteChunk.append (bytechunk.java:366) at  Org.apache.coyote.http11.internaloutputbuffer$outputstreamoutputbuffer.dowrite (InternalOutputBuffer.java:240) At org.apache.coyote.http11.filters.chunkedoutputfilter.dowrite (chunkedoutputfilter.java:119) at  Org.apache.coyote.http11.AbstractOutputBuffer.doWrite (abstractoutputbuffer.java:192) at  Org.apache.coyote.Response.doWrite (response.java:517) at  Org.apache.catalina.connector.OutputBuffer.realWriteBytes (outputbuffer.java:401) ...  30 more

Phenomenon is, tick 6 rows of data, point printing will not respond, the window is turned off, the server background report above the error, tick 5 rows of data There is no problem, suspect several places may have problems:

    1. There is a problem with the PDF data when writing PDF data to the socket. (Do not write to the socket, changed to write files, the contents of the file is normal, excluded.) )

    2. When a page requests a PDF, it uses the Layer.js iframe pop-up window, and the URL parameter is too long to check when multiple rows are selected. (instead of the pop-up window after the execution of a JS submission form, the parameters placed in the form, or error, exclusion.) )

    3. There is a problem with IE opening the PDF stream. (instead of downloading the file form, the problem persists.) Exclude. )

Finally, the discovery is the problem 2. The original is to check the data of all the column sequence into JSON after the background, instead of only the ID column, the data reduced a lot, no problem, but clearly I ruled out, do not understand, rely on.

This article is from the "some" blog, be sure to keep this source http://2924037.blog.51cto.com/2914037/1583865

Clientabortexception. Socket Write Error problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.