commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eli Segev (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FILEUPLOAD-193) FileNotFoundException thrown by DiskFileItem.write
Date Wed, 02 May 2012 14:56:50 GMT

    [ https://issues.apache.org/jira/browse/FILEUPLOAD-193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266611#comment-13266611
] 

Eli Segev commented on FILEUPLOAD-193:
--------------------------------------

I can reproduce this problem when the file name has 50 multi-byte characters, like あいうえおかきくけこはひふへほなにぬねのぁりるれろあいうえおかきくけこはひふへほなにぬねのぁりるれろあいうえおかきくけこはひふへほなにぬねのぁりるれろあいうえおかきくけこはひふへほなにぬねのぁりるれろ.docx.
 If the file name is shortened, no exception takes place.  The stack trace is:
java.io.FileNotFoundException: D:\staging\%E3%81%82%E3%81%84%E3%
81%86%E3%81%88%E3%81%8A%E3%81%8B%E3%81%8D%E3%81%8F%E3%81%91%E3%81%93%E3%81%AF%E3%81%B2%E3%81%B5%E3%81%B8%E3%81%BB%E3%81%AA%E
3%81%AB%E3%81%AC%E3%81%AD%E3%81%AE%E3%81%81%E3%82%8A%E3%82%8B%E3%82%8C%E3%82%8D%E3%81%82%E3%81%84%E3%81%86%E3%81%88%E3%81%8A
%E3%81%8B%E3%81%8D%E3%81%8F%E3%81%91%E3%81%93%E3%81%AF%E3%81%B2%E3%81%B5%E3%81%B8%E3%81%BB%E3%81%AA%E3%81%AB%E3%81%AC%E3%81%
AD%E3%81%AE%E3%81%81%E3%82%8A%E3%82%8B%E3%82%8C%E3%82%8D%E3%81%82%E3%81%84%E3%81%86%E3%81%88%E3%81%8A%E3%81%8B%E3%81%8D%E3%8
1%8F%E3%81%91%E3%81%93%E3%81%AF%E3%81%B2%E3%81%B5%E3%81%B8%E3%81%BB%E3%81%AA%E3%81%AB%E3%81%AC%E3%81%AD%E3%81%AE%E3%81%81%E3
%82%8A%E3%82%8B%E3%82%8C%E3%82%8D%E3%81%82%E3%81%84%E3%81%86%E3%81%88%E3%81%8A%E3%81%8B%E3%81%8D%E3%81%8F%E3%81%91%E3%81%93%
E3%81%AF%E3%81%B2%E3%81%B5%E3%81%B8%E3%81%BB%E3%81%AA%E3%81%AB%E3%81%AC%E3%81%AD%E3%81%AE%E3%81%81%E3%82%8A%E3%82%8B%E3%82%8
C%E3%82%8D.docx (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
at java.io.FileOutputStream.<init>(FileOutputStream.java:145)
at org.apache.commons.fileupload.disk.DiskFileItem.write(DiskFileItem.java:449)

There is no issue with write permission or anything like this, since no other file has this
issue.  The OS is Windows 7.
                
> FileNotFoundException thrown by DiskFileItem.write
> --------------------------------------------------
>
>                 Key: FILEUPLOAD-193
>                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-193
>             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}java.io.FileNotFoundException: /tmp/UploadController/uploading/upload_69651d04_13000a31964__8000_00001651.tmp
(No such file or directory)
>         at java.io.FileInputStream.open(Native Method)
>         at java.io.FileInputStream.<init>(FileInputStream.java:106)
>         at org.apache.commons.fileupload.disk.DiskFileItem.write(DiskFileItem.java:447)
>         at upload.UploadController.handle(UploadController.java:90)
>         ...{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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message