You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Manish Agrawal <ag...@gmail.com> on 2006/03/27 13:25:51 UTC

File upload giving error: Stream ended unexpectedly

 Hi,

I have a web applications using sturts framework. The application allow
users to upload data files on server. The application is running on Apache
Tomcat 5.0 server. I am using Commons File Upload 1.0 for uploading files.

The application is running fine but sometime it fails to upload files and
gives the following error:

Mar 27, 2006 2:31:17 AM
org.apache.struts.upload.CommonsMultipartRequestHandler handleRequest
SEVERE: Failed to parse multipart request
org.apache.commons.fileupload.FileUploadException: Processing of
multipart/form-data request failed. Stream ended unexpectedly
        at org.apache.commons.fileupload.FileUploadBase.parseRequest (
FileUploadBase.java:429)
        at
org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(
CommonsMultipartRequestHandler.java:193)
        at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:443)
        at org.apache.struts.action.RequestProcessor.processPopulate(
RequestProcessor.java:805)
        at org.apache.struts.action.RequestProcessor.process(
RequestProcessor.java:203)
        at org.apache.struts.action.ActionServlet.process (
ActionServlet.java:1194)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java
:432)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at javax.servlet.http.HttpServlet.service (HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:237)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java :157)
        at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:214)
        at org.apache.catalina.core.StandardValveContext.invokeNext(
StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke (
StandardPipeline.java:520)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(
StandardContextValve.java:198)
        at org.apache.catalina.core.StandardContextValve.invoke (
StandardContextValve.java :152)
        at org.apache.catalina.core.StandardValveContext.invokeNext(
StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:520)
        at org.apache.catalina.core.StandardHostValve.invoke (
StandardHostValve.java:137)
        at org.apache.catalina.core.StandardValveContext.invokeNext(
StandardValveContext.java:104)
        at org.apache.catalina.valves.ErrorReportValve.invoke (
ErrorReportValve.java:118)
        at org.apache.catalina.core.StandardValveContext.invokeNext(
StandardValveContext.java:102)
        at org.apache.catalina.valves.AccessLogValve.invoke(
AccessLogValve.java:535)
        at org.apache.catalina.core.StandardValveContext.invokeNext (
StandardValveContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:520)
        at org.apache.catalina.core.StandardEngineValve.invoke (
StandardEngineValve.java:109)
        at org.apache.catalina.core.StandardValveContext.invokeNext(
StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:520)
        at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java
:929)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(
CoyoteAdapter.java:160)
        at org.apache.jk.server.JkCoyoteHandler.invoke (JkCoyoteHandler.java
:300)
        at org.apache.jk.common.HandlerRequest.invoke (HandlerRequest.java
:374)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
        at org.apache.jk.common.ChannelSocket.processConnection (
ChannelSocket.java:675)
        at org.apache.jk.common.SocketConnection.runIt (ChannelSocket.java
:866)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:683)
        at java.lang.Thread.run (Thread.java:534)


The behaviour of application is random, sometime it works fine and sometime
not. I initially thought it's happening when there are many people trying to
upload at the same time. But it's giving error even when only one user is
trying to upload.

When I restart my server it started working fine, I suspect it is throwing
error after uploading certain number of file or certain bytes of data. I am
not sure if it possible. Please let me know if there are any pointers which
could help me debug the problem further.

The server is configured to upload large files, so that's not a problem.

Thanks,
 Manish

Re: File upload giving error: Stream ended unexpectedly

Posted by Nikola Milutinovic <al...@yahoo.com>.
--- Manish Agrawal <ag...@gmail.com> wrote:

>  Hi,
> 
> I have a web applications using sturts framework. The application allow
> users to upload data files on server. The application is running on Apache
> Tomcat 5.0 server. I am using Commons File Upload 1.0 for uploading files.

Struts has it's own File Upload, based on Commons. Why don't you use it?

Nix.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org