tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aeonsun <aeon...@gmail.com>
Subject ClientAbortException: java.net.SocketException: Connection reset
Date Tue, 19 Dec 2006 02:57:28 GMT
hello all:
I'm useing tomcat5.5.17 .tomcat server catch the follow exception and it
don't work sometimes (the http port has be listing yet and no any  message
if I connected it. The pertinent code is after the exception.)

ClientAbortException:  java.net.SocketException: Connection reset
    at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java
:327)
    at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)
    at org.apache.catalina.connector.CoyoteOutputStream.flush(
CoyoteOutputStream.java:97)
    at javax.imageio.stream.FileCacheImageOutputStream.flushBefore(
FileCacheImageOutputStream.java:214)
    at javax.imageio.stream.ImageInputStreamImpl.flush (
ImageInputStreamImpl.java:801)
    at com.sun.imageio.plugins.jpeg.JPEGImageWriter.write(
JPEGImageWriter.java:1002)
    at javax.imageio.ImageWriter.write(ImageWriter.java:598)
    at javax.imageio.ImageIO.write (ImageIO.java:1450)
    at javax.imageio.ImageIO.write(ImageIO.java:1524)
    at net.m2.webapp.action.RandomImageServlet.doGet(RandomImageServlet.java
:45)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java :689)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter (
ApplicationFilterChain.java:173)
    at net.m2.util.EncodingFilter.doFilter(EncodingFilter.java:54)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke (
StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke (
StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:869)
    at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
Http11BaseProtocol.java:664)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java :80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.SocketException: Connection reset
    at java.net.SocketOutputStream.socketWrite (SocketOutputStream.java:96)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(
InternalOutputBuffer.java:746)
    at org.apache.tomcat.util.buf.ByteChunk.flushBuffer (ByteChunk.java:433)
    at org.apache.coyote.http11.InternalOutputBuffer.flush(
InternalOutputBuffer.java:304)
    at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java
:991)
    at org.apache.coyote.Response.action (Response.java:182)
    at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java
:322)
    ... 28 more
ERROR [http-80-Processor108] (ThreadPool.java:693) - Caught exception (
java.lang.OutOfMemoryError : Java heap space) executing
org.apache.tomcat.util.net.LeaderFollowerWorkerThread@2bc278, terminating
thread
ERROR [http-80-Processor36] (CoyoteAdapter.java:157) - An exception or error
occurred in the container during the request processing
java.lang.OutOfMemoryError: Java heap space
ERROR [http-80-Processor58] (FrameworkServlet.java:413) - Could not complete
request
org.springframework.web.util.NestedServletException: Handler processing
failed; nested exception is java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
ERROR [http-80-Processor83] (FrameworkServlet.java:413) - Could not complete
request
org.springframework.web.util.NestedServletException : Handler processing
failed; nested exception is java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
ERROR [http-80-Processor88] (FrameworkServlet.java:413) - Could not complete
request
org.springframework.web.util.NestedServletException: Handler processing
failed; nested exception is java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
ERROR [http-80-Processor3] ( FrameworkServlet.java:413) - Could not complete
request
org.springframework.web.util.NestedServletException: Handler processing
failed; nested exception is java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError : Java heap space
 WARN [http-80-Processor101] (StandardHostValve.java:288) - Exception
Processing ErrorPage[errorCode=404, location=/error.jsp]
ClientAbortException:  java.net.SocketException: Connection reset
    at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java
:327)
    at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java
:293)
    at org.apache.catalina.connector.Response.flushBuffer(Response.java:537)
    at org.apache.catalina.core.StandardHostValve.status(
StandardHostValve.java:286)
    at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:136)
    at org.apache.catalina.valves.ErrorReportValve.invoke (
ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process (
Http11Processor.java:869)
    at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:664)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java :527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
    at java.lang.Thread.run (Thread.java:595)
Caused by: java.net.SocketException: Connection reset
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:96)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(
InternalOutputBuffer.java:746)
    at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:433)
    at org.apache.coyote.http11.InternalOutputBuffer.flush (
InternalOutputBuffer.java:304)
    at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java
:991)
    at org.apache.coyote.Response.action(Response.java:182)
    at org.apache.catalina.connector.OutputBuffer.doFlush (OutputBuffer.java
:322)
    ... 13 more
ERROR [http-80-Processor71] (FrameworkServlet.java:413) - Could not complete
request
org.springframework.web.util.NestedServletException: Handler processing
failed; nested exception is java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
ERROR [http-80-Processor55] (FrameworkServlet.java:413) - Could not complete
request
org.springframework.web.util.NestedServletException : Handler processing
failed; nested exception is java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
ERROR [http-80-Processor71] (CoyoteAdapter.java:157) - An exception or error
occurred in the container during the request processing
java.lang.OutOfMemoryError: Java heap space
ERROR [http-80-Processor74] (FrameworkServlet.java:413) - Could not complete
request
org.springframework.web.util.NestedServletException: Handler processing
failed; nested exception is java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
ERROR [http-80-Processor21] (CoyoteAdapter.java:157) - An exception or error
occurred in the container during the request processing
java.lang.OutOfMemoryError: Java heap space
ERROR [http-80-Processor63] (FrameworkServlet.java:413) - Could not complete
request
org.springframework.web.util.NestedServletException: Handler processing
failed; nested exception is java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
ERROR [http-80-Processor52] (CoyoteAdapter.java:157) - An exception or error
occurred in the container during the request processing
java.lang.OutOfMemoryError: Java heap space
ERROR [http-80-Processor22] (FrameworkServlet.java:413) - Could not complete
request
org.springframework.web.util.NestedServletException: Handler processing
failed; nested exception is java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
ERROR [http-80-Processor89] (FrameworkServlet.java:413) - Could not complete
request
java.lang.OutOfMemoryError: Java heap space
ERROR [http-80-Processor51] (FrameworkServlet.java:413) - Could not complete
request
org.springframework.web.util.NestedServletException: Handler processing
failed; nested exception is java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
ERROR [http-80-Processor96] (FrameworkServlet.java:413) - Could not complete
request
org.springframework.web.util.NestedServletException: Handler processing
failed; nested exception is java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space



code:
protected void doGet(HttpServletRequest request,
            HttpServletResponse response) throws ServletException,
IOException {
        ValidateImage image = new ValidateImage();
        response.setHeader("Pragma", "No-cache");
        response.setHeader("Cache-Control", "no-cache");
        response.setDateHeader ("Expires", 0);
        try {
            BufferedImage im = image.creatImage();
            request.getSession().setAttribute(
                    HttpSessionKeys.ValidateImage, image.sRand);
            ImageIO.write(im, "JPEG", response
                    .getOutputStream());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

(The class ValidateImage generate a object of java.awt.image.BufferedImage)

thanks.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message