commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathias Gehrung <m.gehr...@lokalisten.de>
Subject [fileupload] IOException and SocketTimeoutException
Date Tue, 23 Mar 2010 08:52:20 GMT
Hi,

In a servlet I use fileupload to process a multipart form like this:

     DiskFileItemFactory diskFileItemFactory = new DiskFileItemFactory();
    diskFileItemFactory.setSizeThreshold(4096);
    diskFileItemFactory.setRepository(new File(getServletContext().getRealPath("/imgTemp")));
    ServletFileUpload upload = new ServletFileUpload(diskFileItemFactory);
    upload.setSizeMax(100000000);
    List<FileItem> items = null;
    items = upload.parseRequest(request);

That's where following exceptions are thrown in our production environment. Unfortunately
I haven't been able to reproduce these exceptions. 

SEVERE: org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of
multipart/form-data request failed. null
Mar 22, 2010 12:10:43 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet UploadServlet threw exception
java.net.SocketTimeoutException
	at org.apache.coyote.http11.InternalAprInputBuffer.fill(InternalAprInputBuffer.java:796)
	at org.apache.coyote.http11.InternalAprInputBuffer$SocketInputBuffer.doRead(InternalAprInputBuffer.java:827)
	at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:116)
	at org.apache.coyote.http11.InternalAprInputBuffer.doRead(InternalAprInputBuffer.java:738)
	at org.apache.coyote.Request.doRead(Request.java:428)
	at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:304)
	at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:405)
	at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:327)
	at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193)
	at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:977)
	at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:887)
	at java.io.InputStream.read(InputStream.java:85)
	at org.apache.commons.fileupload.util.Streams.copy(Streams.java:94)
	at org.apache.commons.fileupload.util.Streams.copy(Streams.java:64)
	at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:362)
	at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
	...


SEVERE: org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of
multipart/form-data request failed. null
Mar 22, 2010 12:49:41 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet UploadServlet threw exception
java.io.IOException
	at org.apache.coyote.http11.InternalAprInputBuffer.fill(InternalAprInputBuffer.java:798)
	at org.apache.coyote.http11.InternalAprInputBuffer$SocketInputBuffer.doRead(InternalAprInputBuffer.java:827)
	at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:116)
	at org.apache.coyote.http11.InternalAprInputBuffer.doRead(InternalAprInputBuffer.java:738)
	at org.apache.coyote.Request.doRead(Request.java:428)
	at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:304)
	at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:405)
	at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:327)
	at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193)
	at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:977)
	at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:887)
	at java.io.InputStream.read(InputStream.java:85)
	at org.apache.commons.fileupload.util.Streams.copy(Streams.java:94)
	at org.apache.commons.fileupload.util.Streams.copy(Streams.java:64)
	at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:362)
	at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
	...

Can anyone provide some help on that?

Thanks, 
Mathias


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message