PDA

View Full Version : File Upload Issues



rfulcher
Feb 5th, 2008, 08:49 AM
We are getting this message every so often when people upload files to our server. Can anyone give us a hint as to why. We have tried everything and can't seem to determine whey this happens, and it is not consistant.

Exception: Could not parse multipart servlet request; nested exception is org.apache.commons.fileupload.FileUploadException: Stream ended unexpectedly
Stack Trace: resolveMultipart(org.springframework.web.multipart .commons.CommonsMultipartResolver:126)
checkMultipart(org.springframework.web.servlet.Dis patcherServlet:943)
doDispatch(org.springframework.web.servlet.Dispatc herServlet:797)
doService(org.springframework.web.servlet.Dispatch erServlet:755)
processRequest(org.springframework.web.servlet.Fra meworkServlet:396)
doPost(org.springframework.web.servlet.FrameworkSe rvlet:360)
service(javax.servlet.http.HttpServlet:710)
service(javax.servlet.http.HttpServlet:803)
internalDoFilter(org.apache.catalina.core.Applicat ionFilterChain:269)
doFilter(org.apache.catalina.core.ApplicationFilte rChain:188)
invoke(net.sf.acegisecurity.intercept.web.FilterSe curityInterceptor:108)
doFilter(net.sf.acegisecurity.intercept.web.Securi tyEnforcementFilter:197)
doFilter(net.sf.acegisecurity.util.FilterToBeanPro xy:120)
internalDoFilter(org.apache.catalina.core.Applicat ionFilterChain:215)
doFilter(org.apache.catalina.core.ApplicationFilte rChain:188)
doFilter(net.sf.acegisecurity.ui.AbstractProcessin gFilter:324)
doFilter(net.sf.acegisecurity.util.FilterToBeanPro xy:120)
internalDoFilter(org.apache.catalina.core.Applicat ionFilterChain:215)
doFilter(org.apache.catalina.core.ApplicationFilte rChain:188)
doFilter(net.sf.acegisecurity.context.HttpSessionC ontextIntegrationFilter:220)
doFilter(net.sf.acegisecurity.util.FilterToBeanPro xy:120)
internalDoFilter(org.apache.catalina.core.Applicat ionFilterChain:215)
doFilter(org.apache.catalina.core.ApplicationFilte rChain:188)
invoke(org.apache.catalina.core.StandardWrapperVal ve:210)
invoke(org.apache.catalina.core.StandardContextVal ve:174)
invoke(org.apache.catalina.core.StandardHostValve: 127)
invoke(org.apache.catalina.valves.ErrorReportValve :117)
invoke(org.apache.catalina.core.StandardEngineValv e:108)
service(org.apache.catalina.connector.CoyoteAdapte r:151)
invoke(org.apache.jk.server.JkCoyoteHandler:200)
invoke(org.apache.jk.common.HandlerRequest:283)
invoke(org.apache.jk.common.ChannelSocket:773)
processConnection(org.apache.jk.common.ChannelSock et:703)
runIt(org.apache.jk.common.ChannelSocket$SocketCon nection:895)
run(org.apache.tomcat.util.threads.ThreadPool$Cont rolRunnable:685)
run(java.lang.Thread:595)

lumpynose
Feb 6th, 2008, 09:46 PM
Could the files be too big? I don't know what constitutes "too big."

jglynn
Feb 6th, 2008, 10:28 PM
Are they possibly hitting stop/back/etc in their browser?

garnold
Feb 20th, 2008, 01:41 PM
Thanks for the Replies...


Could the files be too big? I don't know what constitutes "too big."
We are using the CommonsMultipartResolver for the file upload and setting it to a max upload size of -1 which is for no limitation of size. Below is the bean definition. We are using commons-fileupload-1.2 and spring2.0.



<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsM ultipartResolver">
<property name="maxUploadSize" value="-1"/> <!-- No Limit -->
<property name="maxInMemorySize" value="20840"/>
</bean>




Are they possibly hitting stop/back/etc in their browser?

Since it is open to the public, we have no way of determining exactly what they may or could be doing in the middle of the process. I am not aware of any ways to prevent them from using these buttons, without using javascript. Any ideas?

Jörg Heinicke
Feb 22nd, 2008, 12:08 AM
We are getting this message every so often when people upload files to our server. Can anyone give us a hint as to why. We have tried everything and can't seem to determine whey this happens, and it is not consistant.

Just stopping the upload by closing the browser, clicking a link during upload or whatever will cause these errors. Maybe users are just not patient enough or your upload is too slow in general?

Joerg