0

ALL,我正在做一个需要从.net 上传大文件(200MB)到 JBoss 的项目。到目前为止,我已经为 HttpWebRequest 对象设置了超时属性,但在 JBOSS 控制台中仍然出现异常

10:31:06,896 ERROR [DeployServlet] Failed to upload file.
org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. null
     at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:359)
     at com.accela.deploy.servlet.RequestHandler.getUploadFileFromRequest(RequestHandler.java:86)
     at com.accela.deploy.servlet.DeployServlet.doPost(DeployServlet.java:118)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at com.accela.commom.filter.AuthFilter.doFilter(AuthFilter.java:99)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
     at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
     at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
     at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1733)
     at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.IOException
     at org.apache.coyote.http11.InternalAprInputBuffer.fill(InternalAprInputBuffer.java:801)
     at org.apache.coyote.http11.InternalAprInputBuffer$SocketInputBuffer.doRead(InternalAprInputBuffer.java:830)
     at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:116)
     at org.apache.coyote.http11.InternalAprInputBuffer.doRead(InternalAprInputBuffer.java:738)
     at org.apache.coyote.Request.doRead(Request.java:427)
     at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:304)
     at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:419)
     at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:327)
     at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193)
     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:101)
     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)
     ... 26 more
10:31:07,973 INFO  [RequestHandler] Failed

我相信这是因为 http 请求超时问题。JBoss 接受长时间 Http 连接是否有任何超时配置?谢谢。

4

1 回答 1

1

可能您遇到了这个错误。如果您使用的是 Tomcat Native 库,请尝试停用它们以查看它是否可以正常工作。或者使用带有 mod_proxy 的 Apache httpd 服务器并在 JBoss 服务器上使用 AJP 连接器 - 如果它确实是 HTTP 连接器中的错误,那可能是一种解决方法。

但是要回答有关超时的问题,请查看文件server/default/deploy/jboss-web.deployer/server.xml(如有必要,请替换default为您正在使用的配置)。确保在元素<Connector port="8080" ...中将属性disableUploadTimeout设置为true。有关此属性和连接器配置的更多信息,请参阅文档

于 2012-09-26T22:35:42.247 回答