Problem Uploading Files

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Problem Uploading Files

ujjwalbsoni
This post has NOT been accepted by the mailing list yet.
Hi,

I am facing an issue with Servlet Upload. I get below Error when i upload CSV files using Servlet Upload. The strange part about this is that this error is thrown sometimes and sometimes it uploads fine.

Here are the details for this issue ::

Error ::

<nabble_embed> 1. 11/10/07 17:41:12 org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Broken pipe 2. 11/10/07 17:41:12 at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:384) 3. 11/10/07 17:41:12 at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:116) 4. 11/10/07 17:41:12 at FileUploadServlet.doFileUpload(FileUploadServlet.java:130) 5. 11/10/07 17:41:12 at FileUploadServlet.doPost(FileUploadServlet.java:117) 6. 11/10/07 17:41:12 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) 7. 11/10/07 17:41:12 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 8. 11/10/07 17:41:12 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:835) 9. 11/10/07 17:41:12 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:341) 10. 11/10/07 17:41:12 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:816) 11. 11/10/07 17:41:12 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:231) 12. 11/10/07 17:41:12 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:136) 13. 11/10/07 17:41:12 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) 14. 11/10/07 17:41:12 at java.lang.Thread.run(Thread.java:534) </nabble_embed>


Servlet Code

#  FileUploadListener listener = new FileUploadListener(request.getContentLength());  
#               System.out.println("this prints");  
#           FileItemFactory factory = new MonitoredDiskFileItemFactory(listener);  
#               System.out.println("this prints");  
#           ServletFileUpload upload = new ServletFileUpload(factory);  
#  
#           List items = upload.parseRequest(request); // i get error here  


Any help will be highly appreciated.

Thanks,

Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"