commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] [Commented] (FILEUPLOAD-193) FileNotFoundException thrown by DiskFileItem.write
Date Wed, 02 May 2012 22:26:50 GMT


Sebb commented on FILEUPLOAD-193:

I think the clue is in this part of the trace (I should have noted it earlier):

bq. (The filename, directory name, or volume label syntax is incorrect)

The reference to a syntax error presumably refers to the excess length.

BTW, I'm not sure why this is treated as FileNotFoundException rather than some other IOException.
[The same happens if the file exists but cannot be written, e.g. is read-only]
The use of FNFE is confusing.
> FileNotFoundException thrown by DiskFileItem.write
> --------------------------------------------------
>                 Key: FILEUPLOAD-193
>                 URL:
>             Project: Commons FileUpload
>          Issue Type: Bug
>    Affects Versions: 1.2.2
>         Environment: Ubuntu 10.10
> java version "1.6.0_24"
> Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
> Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)
>            Reporter: Dan Washusen
>            Priority: Critical
> Under certain conditions the DiskFileItem.write throws a FileNotFound exception.  It
seems to be when outputFile.renameTo(file) fails.
> {code} /tmp/UploadController/uploading/upload_69651d04_13000a31964__8000_00001651.tmp
(No such file or directory)
>         at Method)
>         at<init>(
>         at org.apache.commons.fileupload.disk.DiskFileItem.write(
>         at upload.UploadController.handle(
>         ...{code}
> I can't see any obvious reason why the source file (outputFile) wouldn't exist...

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message