You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Alejandro Scandroli (JIRA)" <ji...@apache.org> on 2011/04/07 09:01:06 UTC
[jira] [Created] (TAP5-1504) Tapestry will crash on startup if
tapestry-upload is on the classpath.
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
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
[jira] [Commented] (TAP5-1504) on GAE Tapestry will crash on
startup if tapestry-upload is on the classpath.
Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Updated] (TAP5-1504) Tapestry will crash on startup if
tapestry-upload is on the classpath.
Posted by "Alejandro Scandroli (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alejandro Scandroli updated TAP5-1504:
--------------------------------------
Attachment: TAP5-1504.patch
Here is a silly patch (with the code I mentioned before) against the maint-5-2 branch
> 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
[jira] [Closed] (TAP5-1504) on GAE Tapestry will crash on startup
if tapestry-upload is on the classpath.
Posted by "Alejandro Scandroli (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alejandro Scandroli closed TAP5-1504.
-------------------------------------
Resolution: Won't Fix
Hi Robert I just saw in the mailing list* that you can set <property name="java.io.tmpdir" value="" /> in the appengine-web.xml . That fixes this issue without having to patch Tapestry.
* http://tapestry.1045711.n5.nabble.com/Tapestry-upload-and-Google-App-Engine-td4717221.html
> 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
[jira] [Updated] (TAP5-1504) on GAE Tapestry will crash on startup
if tapestry-upload is on the classpath.
Posted by "Alejandro Scandroli (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alejandro Scandroli updated TAP5-1504:
--------------------------------------
Summary: on GAE Tapestry will crash on startup if tapestry-upload is on the classpath. (was: Tapestry will crash on startup if tapestry-upload is on the classpath.)
> 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
[jira] [Commented] (TAP5-1504) on GAE Tapestry will crash on
startup if tapestry-upload is on the classpath.
Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Closed] (TAP5-1504) on GAE Tapestry will crash on startup
if tapestry-upload is on the classpath.
Posted by "Alejandro Scandroli (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alejandro Scandroli closed TAP5-1504.
-------------------------------------
Resolution: Won't Fix
Hi Robert I just saw in the mailing list* that you can set <property name="java.io.tmpdir" value="" /> in the appengine-web.xml . That fixes this issue without having to patch Tapestry.
* http://tapestry.1045711.n5.nabble.com/Tapestry-upload-and-Google-App-Engine-td4717221.html
> 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
[jira] [Updated] (TAP5-1504) Tapestry will crash on startup if
tapestry-upload is on the classpath.
Posted by "Alejandro Scandroli (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alejandro Scandroli updated TAP5-1504:
--------------------------------------
Attachment: TAP5-1504.patch
Here is a silly patch (with the code I mentioned before) against the maint-5-2 branch
> 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
[jira] [Updated] (TAP5-1504) on GAE Tapestry will crash on startup
if tapestry-upload is on the classpath.
Posted by "Alejandro Scandroli (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alejandro Scandroli updated TAP5-1504:
--------------------------------------
Summary: on GAE Tapestry will crash on startup if tapestry-upload is on the classpath. (was: Tapestry will crash on startup if tapestry-upload is on the classpath.)
> 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