Re: FileUploadBase$UnknownSizeException: the request was rejected because its size is unknown
configure the maximum limit in struts controller controller processorClass=your class nocache=true locale=true contentType=text/html;charset=UTF-8 **maxFileSize=15G/** When you are using apache.commons.fileuploa-1.1 there is a constraint that FileUpload refuses parsing requests of unknown length. In the succeeding version stream has been introduced to overcome the size issue. Below issues were reported in apache.commons.fileupload in 1.2 1.3 1. After uploading, temp file is not removed 2. Input stream is not closed which leads to memleak. REF: refuses parsing request of unknown lenght Memleak when stream is not closed. Memleak -- View this message in context: http://struts.1045723.n5.nabble.com/FileUploadBase-UnknownSizeException-the-request-was-rejected-because-its-size-is-unknown-tp5716405p5716414.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
FileUploadBase$UnknownSizeException: the request was rejected because its size is unknown
I am using struts1 and apache.commons.fileupload1.0 to upload a file of size more than 4 GB[may change] results in the below exception. I have gone through struts fileupload api which mentions 256M is the maximum limit. Is it possible to upload a huge file size of more than 4GB ? How to change the default limit 256M to higher limit?. If it is not possible is there any way to upload a file in struts1? [org.apache.struts.upload.CommonsMultipartRequestHandler - handleRequest] (CommonsMultipartRequestHandler.java:190) - Failed to parse multipart request org.apache.commons.fileupload.FileUploadBase$UnknownSizeException: the request was rejected because its size is unknown at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:305) at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268) at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:182) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:389) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:191) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858) at javax.servlet.http.HttpServlet.service(HttpServlet.java:643) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) 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.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.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) 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.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:745) I have tried upto 256M limit it works fine. -- View this message in context: http://struts.1045723.n5.nabble.com/FileUploadBase-UnknownSizeException-the-request-was-rejected-because-its-size-is-unknown-tp5716405.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: FileUploadBase$UnknownSizeException: the request was rejected because its size is unknown
Have you checked the controller configuration in struts-config.xml http://struts.apache.org/release/1.3.x/userGuide/configuration.html -- Thanks Regards Sreekanth S Nair Java Developer --- eGovernments Foundation http://www.egovernments.org Ph : 9980078913 --- http://in.linkedin.com/pub/sreekanth-s-nair/b/946/5a0/ https://github.com/sreekanthsnair sreekanthsn...@hotmail.co.uk sreekanths...@gmail.com --- On Tue, Jul 15, 2014 at 5:47 PM, shriram shri1984...@gmail.com wrote: I am using struts1 and apache.commons.fileupload1.0 to upload a file of size more than 4 GB[may change] results in the below exception. I have gone through struts fileupload api which mentions 256M is the maximum limit. Is it possible to upload a huge file size of more than 4GB ? How to change the default limit 256M to higher limit?. If it is not possible is there any way to upload a file in struts1? [org.apache.struts.upload.CommonsMultipartRequestHandler - handleRequest] (CommonsMultipartRequestHandler.java:190) - Failed to parse multipart request org.apache.commons.fileupload.FileUploadBase$UnknownSizeException: the request was rejected because its size is unknown at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:305) at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268) at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:182) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:389) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:191) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858) at javax.servlet.http.HttpServlet.service(HttpServlet.java:643) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) 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.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.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) 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.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:745) I have tried upto 256M limit it works fine. -- View this message in context: http://struts.1045723.n5.nabble.com/FileUploadBase-UnknownSizeException-the-request-was-rejected-because-its-size-is-unknown-tp5716405.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org