我使用gwtupload
插件在GWT中开发了多个文件上传。它在调试模式下工作正常。我创建了war
并在jboss-as-7.1.1.Final
开始。如果我上传一个文件它的工作正常,但当我选择其他文件上传其投掷和错误。
java.lang.RuntimeException: The request has been rejected because the server is already receiving another file.
这是我的服务器日志。现在该如何解决这个错误?
16:22:52,147 INFO [gwtupload.server.UploadListener] (http--0.0.0.0-8081-6) UploadListener created new instance. (slow=200, requestSize=4672140)
16:22:59,361 SEVERE [gwtupload.server.UploadServlet] (http--0.0.0.0-8081-4) UPLOAD-SERVLET (pB19zxemUC3i-3tAQt5G+SzE.undefined) The request has been rejected because the server is already receiving another file.
16:22:59,549 INFO [gwtupload.server.UploadListener] (http--0.0.0.0-8081-6) UploadListener pB19zxemUC3i-3tAQt5G+SzE.undefined The upload has been canceled after 139137 bytes received, raising an exception (RuntimeException) to close the socket
16:22:59,690 SEVERE [gwtupload.server.UploadServlet] (http--0.0.0.0-8081-6) UPLOAD-SERVLET (pB19zxemUC3i-3tAQt5G+SzE.undefined) Unexpected Exception -> The request has been rejected because the server is already receiving another file.
java.lang.RuntimeException: The request has been rejected because the server is already receiving another file.
at gwtupload.server.UploadAction.doPost(UploadAction.java:200)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at com.nextenders.server.ExceptionHandler.doFilter(ExceptionHandler.java:28)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:66)
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
at java.lang.Thread.run(Unknown Source)
16:22:59,713 INFO [gwtupload.server.UploadServlet] (http--0.0.0.0-8081-6) Unknown Exception when receiving a file.: gwtupload.server.exceptions.UploadException: java.lang.RuntimeException: The request has been rejected because the server is already receiving another file.
at gwtupload.server.UploadServlet.parsePostRequest(UploadServlet.java:985) [gwtupload-custom.jar:]
at gwtupload.server.UploadAction.doPost(UploadAction.java:178) [gwtupload-custom.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at com.nextenders.server.ExceptionHandler.doFilter(ExceptionHandler.java:28) [classes:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:66) [guice-servlet-3.0.jar:]
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) [guice-servlet-3.0.jar:]
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) [guice-servlet-3.0.jar:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_25]
Caused by: java.lang.RuntimeException: The request has been rejected because the server is already receiving another file.
at gwtupload.server.UploadAction.doPost(UploadAction.java:200) [gwtupload-custom.jar:]
... 23 more
答案 0 :(得分:0)
发生这种情况是因为servlet中使用的前一个侦听器尚未从内存中删除。通常,如果浏览器中有多个选项卡实例,或者在上载文件时重新加载应用程序,则可能会发生这种情况。等一会儿,再试一次。
我从未在我的项目中使用jboss,因此可能是其servlet容器中的一个问题,尽管它使用了与gwtupload兼容的tomcat。
如果您可以在一个可以重现问题的简单项目中隔离问题,请将其发布,以便我可以查看和调试。