Issue Details (XML | Word | Printable)

Key: XWIKI-530
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: Arun Reddy
Reporter: Sergiu Dumitriu
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XWiki Core

Upload fails when xwiki.upload.tempdir is not set

Created: 13/Dec/06 18:37   Updated: 06/Apr/09 19:55
Component/s: Core
Affects Version/s: None
Fix Version/s: None

Date of First Response: 27/Apr/07 18:43
Resolution Date: 06/Apr/09 17:54


 Description  « Hide
The parameter xwiki.upload.tempdir is used to specify where to put files larger than the in-memory threshold. On some (linux) systems, if this path is not set, the upload action fails, throwing:

java.lang.NullPointerException
at com.xpn.xwiki.web.UploadAction.action(UploadAction.java:51)

This should be fixed by checking if the default location is writable, and providing a default writable path, like /tmp, or TOMCAT_HOME/temp on linux.



 All   Comments   Change History   FishEye      Sort Order: Ascending order - Click to sort in descending order
Vincent Massol added a comment - 27/Apr/07 18:43
Note: There is also a wrong "Temporary directory not set" message that happens when the multipart/form-data mimetype is blocked. This has happened for example with Apache and mod_security. We need some better exception for this.

Sergiu Dumitriu added a comment - 06/Apr/09 17:54
Apparently the commons-fileupload library was changed, so that it now defaults to using java.io.tmpdir whenever a custom directory is not provided. it's working fine now.

Sergiu Dumitriu added a comment - 06/Apr/09 19:55
Actually this was fixed in rev. 3767, during a pretty massive cleanup of the plugin.