Bug 21116 - EOFException thrown - seemingly random
Summary: EOFException thrown - seemingly random
Status: RESOLVED INVALID
Alias: None
Product: Tomcat 4
Classification: Unclassified
Component: Unknown (show other bugs)
Version: 4.1.18
Hardware: PC All
: P3 normal with 18 votes (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-26 15:11 UTC by Daniel Lipton
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Lipton 2003-06-26 15:11:02 UTC
Our client's Tomcat installation seems to throw this at random times.  I'm not
what the effect is.  
It's running the web server that comes with Tomcat.

O/S is Windows 2000 Server version 5.0.2195 SP3 Build 2195

2003-06-20 12:41:33 server: Replied to the client 
2003-06-20 12:41:33 StandardWrapperValve[server]: Servlet.service() for servlet
server threw exception 
java.io.EOFException 
        at
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2165) 
        at
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2634)

        at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:734) 
        at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253) 
        at com.btec.server.BTecServlet.doPost(BTecServlet.java:25) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) 
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) 
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) 
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) 
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) 
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) 
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) 
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) 
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) 
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 
        at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) 
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261) 
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360) 
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632) 
        at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:590) 
        at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707) 
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530) 
        at java.lang.Thread.run(Thread.java:536)
Comment 1 Daniel Lipton 2003-06-30 14:05:19 UTC
By the way, line 25 in BTecServlet is the second line here:

    public void doPost(HttpServletRequest request, HttpServletResponse
response)throws ServletException, IOException{
    	ObjectInputStream in = null;
        ObjectOutputStream out = null;
Comment 2 Daniel Lipton 2003-06-30 14:09:13 UTC
Excuse me, line 25 is the second line in the following code: (not what I had
just posted)

    public void doPost(HttpServletRequest request, HttpServletResponse
response)throws ServletException, IOException{
    	ObjectInputStream in = new ObjectInputStream(request.getInputStream());
Comment 3 Tim Funk 2003-06-30 14:14:43 UTC
It "feels" random because the web client is not posting the correct content
length. This usually happens when the web client has aborted the request during
the process of making the post.