I'm trying to upload a file with ~25Mb. But an exception appears on my Tomcat log regarding the size limit exception throwed by FileUpload. Should not exist someway to configure this limit over the FileChooser component? There is other way to do it that I'm missing?
Thanks in advance,
Jader
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I remember correctly there was discussion on this issue some time ago. Just make a search. You may as well try to search bug and feature requests. It should be there as well.
Regards,
Oleksandr
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No it dosnt work. If the File ist bigger than ~1MB it dont work. I tested it with the ThinWireSDK_v1.2_RC2.
org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. C:\upload_00000000.tmp (Zugriff verweigert)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:429)
at thinwire.render.web.WebServlet.handleUserUpload(WebServlet.java:279)
at thinwire.render.web.WebServlet.service(WebServlet.java:116)
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 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
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:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm trying to upload a file with ~25Mb. But an exception appears on my Tomcat log regarding the size limit exception throwed by FileUpload. Should not exist someway to configure this limit over the FileChooser component? There is other way to do it that I'm missing?
Thanks in advance,
Jader
If I remember correctly there was discussion on this issue some time ago. Just make a search. You may as well try to search bug and feature requests. It should be there as well.
Regards,
Oleksandr
This should be fixed in RC2.
You are right Joshua, the RC2 corrected the problem. At least, I retested it. My mistake... :)
No it dosnt work. If the File ist bigger than ~1MB it dont work. I tested it with the ThinWireSDK_v1.2_RC2.
org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. C:\upload_00000000.tmp (Zugriff verweigert)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:429)
at thinwire.render.web.WebServlet.handleUserUpload(WebServlet.java:279)
at thinwire.render.web.WebServlet.service(WebServlet.java:116)
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 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
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:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
remove
webapps/WEB-INF/lib/commons-fileupload-1.0.jar
replace with
webapps/WEB-INF/lib/commons-fileupload-1.2.1.jar,
webapps/WEB-INF/lib/commons-io-1.3.2.jar
Edit thinwire.render.web.WebServelet.java
Remove following import statements:
import org.apache.commons.fileupload.DiskFileUpload;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUploadException;
Replace with:
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
Modify method handleUserUpload()
Remove following lines of code:
DiskFileUpload upload = new DiskFileUpload();
upload.setSizeThreshold(1000000);
upload.setSizeMax(-1);
upload.setRepositoryPath("C:\\");
Replace with:
DiskFileItemFactory factory = new DiskFileItemFactory();
factory.setSizeThreshold(1000000);
ServletFileUpload upload = new ServletFileUpload(factory);
upload.setSizeMax(-1);
With these changes, I can upload files greater than 1 Gig.
Thanks jimfuller. It works fine.