tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Szynol <pj...@columbia.edu>
Subject Re: FileUploadBase$IOFileUploadException
Date Thu, 02 Sep 2010 20:24:17 GMT

Hey, André,

Thanks for your note.

After his second email, I understood better Konstantin's point (there 
are subsequent exchanges, after the one you're quoting), and I agree 
with you and him that the exception seems related to a file system 
permission issue.

> - when it starts doing this (writing to disk), it is going to create 
> this temporary file in the directory indicated by .setRepository().  
> If this is not explicitly set, it will default to "/".
>
> So what happened on your first iteration, was that when the size 
> exceeded the default of 1 MB, it tried to create a temporary file in 
> "/", and failed because Tomcat does not have permission to write 
> there.  From there came the (accurate) error message.

So, interestingly, I actually tried the opposite and simply removed the 
setRepository() call altogether, to let fileupload use its default value 
(which I had avoided doing for the reasons you list).  I am no longer 
getting the exception.  I think that means the default value for 
setRepository is not  "/", but javax.servlet.context.tempdir or 
java.io.tmpdir or another temp directory.

I still don't quite understand why setting the temp directory expressly 
failed (as Tomcat had permission to write to it), and I haven't checked 
the default temp directories yet to see if that is in fact where the 
temp file is now being written (it should be written somewhere, since 
the images have exceeded the threshold size).  But this seems to confirm 
that, as you both suggested, the exception results from a file system 
permission.

Best wishes,
Paul



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


Mime
View raw message