Java 错误:连接关闭:读取失败。可能遇到流的结尾

Java 错误:连接关闭:读取失败。可能遇到流的结尾,java,file-upload,websphere,tomcat6,java-io,Java,File Upload,Websphere,Tomcat6,Java Io,我试图通过我的web应用程序上载文件,并收到以下消息: 连接关闭:读取失败。遇到可能的流结束。 这种行为被多次观察到, 在tomcat6 web服务器上工作,而在WebSphere上持续出现故障, 这让我认为问题应该在后端,而不是浏览器端。 这是错误消息: org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Con

我试图通过我的web应用程序上载文件,并收到以下消息: 连接关闭:读取失败。遇到可能的流结束。

这种行为被多次观察到, 在tomcat6 web服务器上工作,而在WebSphere上持续出现故障, 这让我认为问题应该在后端,而不是浏览器端。 这是错误消息:

org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Connection close: Read failed.  Possible end of stream encountered. 
    at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBaseo.java:359)
    at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1071)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3815)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:981)
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:84)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:558)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:608)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:985)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1074)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1702)
Caused by: java.io.IOException: Connection close: Read failed.  Possible end of stream encountered. 
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:727)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.processWork(WorkQueueManager.java:342)
    at com.ibm.ws.tcp.channel.impl.NioTCPReadRequestContextImpl.processSyncReadRequest(NioTCPReadRequestContextImpl.java:75)
    at com.ibm.ws.tcp.channel.impl.TCPReadRequestContextImpl.read(TCPReadRequestContextImpl.java:111)
    at com.ibm.ws.http.channel.impl.HttpServiceContextImpl.fillABuffer(HttpServiceContextImpl.java:4175)
    at com.ibm.ws.http.channel.impl.HttpServiceContextImpl.readSingleBlock(HttpServiceContextImpl.java:3407)
    at com.ibm.ws.http.channel.impl.HttpServiceContextImpl.readBodyBuffer(HttpServiceContextImpl.java:3513)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundServiceContextImpl.getRequestBodyBuffer(HttpInboundServiceContextImpl.java:1791)
    at com.ibm.ws.webcontainer.channel.WCCByteBufferInputStream.bufferIsGood(WCCByteBufferInputStream.java:371)
    at com.ibm.ws.webcontainer.channel.WCCByteBufferInputStream.read(WCCByteBufferInputStream.java:265)
    at com.ibm.ws.webcontainer.srt.http.HttpInputStream.read(HttpInputStream.java:322)
    at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:959)
    at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:887)
    at java.io.InputStream.read(InputStream.java:82)
    at org.apache.commons.fileupload.util.Streams.copy(Streams.java:94)
    at org.apache.commons.fileupload.util.Streams.copy(Streams.java:64)
    at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:354)
    ... 27 more

根据此处有限的信息,很难确定原因。常见的怀疑可能是在请求的持续时间内达到时间限制,或者在IBMHTTP服务器(如果正在使用)中启动对WebSphere插件的响应;或者可能是上传的大小


这里没有太多其他内容。

堆栈跟踪没有显示任何配置选项。发布整个堆栈,相关源代码。