作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试上传数据库中的 dmp 文件。在我的本地主机 (tomcat
) 中,一切正常,但在部署到 tomcat
上的 linux
服务器后,它甚至无法上传 46 kb 的文件。如果文件大小非常小,比如 4 Kb,那么它会正确上传。下面提到了我得到的异常:
异常:
2013/Nov/06 17:39:58 ERROR [http-bio-13080-exec-21] (ArchiveImportServlet:call:72) - Exception in File Upload :Processing of multipart/form-data request failed. /home/preuatuser/preuat/apache-tomcat-7.0.42/temp/upload__659e2f43_1422d4e6c7b__7fff_00000017.tmp (No such file or directory)
org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. /home/preuatuser/preuat/apache-tomcat-7.0.42/temp/upload__659e2f43_1422d4e6c7b__7fff_00000017.tmp (No such file or directory)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:367)
at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
at com.nec.jp.netmiracle.server.archive.ArchiveImportServlet.call(ArchiveImportServlet.java:69)
at com.nec.jp.netmiracle.server.BaseServlet.process(BaseServlet.java:141)
at com.nec.jp.netmiracle.server.BaseServlet.doPost(BaseServlet.java:174)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.nec.jp.netmiracle.server.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.io.FileNotFoundException: /home/preuatuser/preuat/apache-tomcat-7.0.42/temp/upload__659e2f43_1422d4e6c7b__7fff_00000017.tmp (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
at java.io.FileOutputStream.<init>(FileOutputStream.java:165)
at org.apache.commons.io.output.DeferredFileOutputStream.thresholdReached(DeferredFileOutputStream.java:165)
at org.apache.commons.io.output.ThresholdingOutputStream.checkThreshold(ThresholdingOutputStream.java:221)
at org.apache.commons.io.output.ThresholdingOutputStream.write(ThresholdingOutputStream.java:127)
at org.apache.commons.fileupload.util.Streams.copy(Streams.java:101)
at org.apache.commons.fileupload.util.Streams.copy(Streams.java:64)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:362)
请提供任何解决方案。
最佳答案
您可能想尝试更高的 sizeThreshold,这是 DiskFileItem 的构造函数中的一个参数.
关于java - 文件上传期间的 org.apache.commons.fileupload.FileUploadBase$IOFileUploadException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19811915/
我正在尝试上传数据库中的 dmp 文件。在我的本地主机 (tomcat) 中,一切正常,但在部署到 tomcat 上的 linux 服务器后,它甚至无法上传 46 kb 的文件。如果文件大小非常小,比
我是一名优秀的程序员,十分优秀!