gpt4 book ai didi

java - 文件上传期间的 org.apache.commons.fileupload.FileUploadBase$IOFileUploadException

转载 作者:行者123 更新时间:2023-11-28 21:53:38 28 4
gpt4 key购买 nike

我正在尝试上传数据库中的 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/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com