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

Robert Zeigler commented on TAP5-1504:
--------------------------------------

So, on GAE, with your custom implementation of FileItemFactory, you don't need 
the UploadSymbols.REPOSITORY_LOCATION, correct?  As an alternative workaround, 
why not supply the system property yourself? I haven't used GAE, really, so I 
don't know if specifying -Dupload.repository-location=gae.dummy.location is 
reasonable or not, but there should also be a point early enough in the IOC 
registry bootstrapping process that would allow you to 
System.setProperty(...,...).  At least as a temporary workaround. 


> on GAE Tapestry will crash on startup if tapestry-upload is on the classpath.
> -----------------------------------------------------------------------------
>
>                 Key: TAP5-1504
>                 URL: https://issues.apache.org/jira/browse/TAP5-1504
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-upload
>    Affects Versions: 5.2.5
>            Reporter: Alejandro Scandroli
>         Attachments: TAP5-1504.patch
>
>
> I'm trying to deploy a tapestry project to GAE. Everything seems to work fine 
> except for tapestry-upload. In fact the application will crash on startup if 
> the tapestry-upload library is on the classpath, even when I contribute my 
> own GAE compatible FileItemFactory.
> After a little bit of digging I found the offending line in UploadModule:
> configuration.add(UploadSymbols.REPOSITORY_LOCATION, 
> System.getProperty("java.io.tmpdir"));
> This line will throw a NPE when System.getProperty("java.io.tmpdir") returns 
> NULL. I couldn't find any quick workarounds without having to touch the 
> UploadModule code, that's why I'm filing this issue.
> My naïve attempt to fix this is to use:
> String tmpdir = System.getProperty("java.io.tmpdir");
> if (tmpdir != null) configuration.add(UploadSymbols.REPOSITORY_LOCATION, 
> tmpdir);
> But I don't know If I should consider other scenarios. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to