[ https://issues.apache.org/jira/browse/TAP5-2364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14082314#comment-14082314 ]
Jonathan Williams commented on TAP5-2364: ----------------------------------------- Caused by: java.lang.RuntimeException: Exception invoking method public void org.apache.tapestry5.internal.webresources.ResourceTransformerFactoryImpl.createCacheDir(): access denied ("java.io.FilePermission" "images/tapestry-asset-cache" "write") at org.apache.tapestry5.ioc.internal.util.InternalUtils$26$1.initialize(InternalUtils.java:1691) at org.apache.tapestry5.ioc.internal.util.ConstructionPlan$1.run(ConstructionPlan.java:80) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:56) ... 216 more Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "images/tapestry-asset-cache" "write") at java.security.AccessControlContext.checkPermission(AccessControlContext.java:375) at java.security.AccessController.checkPermission(AccessController.java:565) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at java.lang.SecurityManager.checkWrite(SecurityManager.java:979) at java.io.File.mkdir(File.java:1314) at java.io.File.mkdirs(File.java:1343) at org.apache.tapestry5.internal.webresources.ResourceTransformerFactoryImpl.createCacheDir(ResourceTransformerFactoryImpl.java:65) > beta15 breaks Google App Engine & other Production environments > --------------------------------------------------------------- > > Key: TAP5-2364 > URL: https://issues.apache.org/jira/browse/TAP5-2364 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-webresources > Affects Versions: 5.4 > Reporter: Jonathan Williams > > beta15 breaks GAE & some other prod environments > I have a couple of app engine apps that are broken w/ beta15 > This is due to use of java.io.File to mkdir, which is prohibited on app > engine and is more generally considered a JEE no-no. > ... > ResourceTransformerFactoryImpl creates a File for the asset cache directory. > This breaks my app in GAE, since creating a new File is prohibited. > ... > it looks like the cache is only used in development > mode but still references File in production (thus breaking GAE). Perhaps a > proper fix will involve a pluggable cache which does nothing in production > mode. > As a workaround you can override the ResourceTransformerFactory via ioc > with an implementation that doesn't reference java.io.File. Most likely a > copy/paste/tweak of the current version. > ... > Note, this could also break non GAE environments since it calls mkdirs() on > @Symbol(WebResourcesSymbols.CACHE_DIR). For example a unix server without > write permission. -- This message was sent by Atlassian JIRA (v6.2#6252)