google-app-enginestruts2file-permissionsaccesscontrolexception

appengine struts 2.3.4.1 error (struts trying to reload server)


I'm facing this problem on my struts 2.3.4.1 AppEngine 1.7.2 (GAE) project. It seems that struts is trying to reload the server and it's forbidden by appEngine.

I've googled this issue but only found struts2.1.8 version error fixing changing by struts2.1.6.

web.xml:

<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5">
<display-name>LifeMusic</display-name>

<filter>
  <filter-name>struts2</filter-name>
  <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>

<filter-mapping>
  <filter-name>struts2</filter-name>
   <url-pattern>*.action</url-pattern>
</filter-mapping>   

<welcome-file-list>
    <welcome-file>home.jsp</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

libs on WEB-INF/lib:

appengine-api-1.0-sdk-1.7.2.1.jar
appengine-api-labs.jar
appengine-api-labs-1.7.2.1.jar
appengine-endpoints.jar
appengine-jsr107cache-1.7.2.1.jar
commons-fileupload-1.2.2.jar
commons-io-2.0.1.jar
commons-lang3-3.1.jar
datanucleus-appengine-1.0.10.final.jar
datanucleus-core-1.1.5.jar
datanucleus-jpa-1.1.5.jar
freemarker-2.3.19.jar
geronimo-jpa_3.0_spec-1.1.1.jar
geronimo-jta_1.1_spec-1.1.1.jar
gwt-servlet.jar
javassist-3.11.0.GA.jar
jdo2-api-2.3-eb.jar
jsr107cache-1.1.jar
log4j-1.2.15.jar
mail.jar
ognl-3.0.5.jar
struts2-core-2.3.4.1.jar
xwork-core-2.3.4.1.jar

stacktrace error:

java.security.AccessControlException: access denied ("java.io.FilePermission" "jar:file:\G:\Proyectos\LifeMusic\war\WEB-INF\lib\struts2-core-2.3.4.1.jar" "read")<br/>
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:366)<br/>
at java.security.AccessController.checkPermission(AccessController.java:555)<br/>
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)<br/>
at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:289)<br/>
at java.lang.SecurityManager.checkRead(SecurityManager.java:888)<br/>
at java.util.zip.ZipFile.<init>(ZipFile.java:205)<br/>
at java.util.zip.ZipFile.<init>(ZipFile.java:144)<br/>
at java.util.jar.JarFile.<init>(JarFile.java:152)<br/>
at java.util.jar.JarFile.<init>(JarFile.java:89)<br/>
at com.opensymphony.xwork2.util.fs.JarEntryRevision.needsReloading(JarEntryRevision.java:36)<br/>
at com.opensymphony.xwork2.util.fs.DefaultFileManager.fileNeedsReloading(DefaultFileManager.java:68)<br/>
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:346)<br/>
at org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:169)<br/>
at com.opensymphony.xwork2.config.ConfigurationManager.needReloadContainerProviders(ConfigurationManager.java:203)<br/>
at com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:177)<br/>
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:72)<br/>
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:901)<br/>
at org.apache.struts2.dispatcher.ng.PrepareOperations.createActionContext(PrepareOperations.java:78)<br/>
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:78)<br/>
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)<br/>
at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)<br/>
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)<br/>
at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:110)<br/>
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)<br/>
at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)<br/>
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)<br/>
at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:61)<br/>
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)<br/>
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)<br/>
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)<br/>
at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:125)<br/>
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)<br/>
at com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:97)<br/>
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)<br/>
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)<br/>
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)<br/>
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)<br/>
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)<br/>
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)<br/>
at com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:94)<br/>
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)<br/>
at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:380)<br/>
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)<br/>
at org.mortbay.jetty.Server.handle(Server.java:326)<br/>
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)<br/>
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)<br/>
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)<br/>
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)<br/>
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)<br/>
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)<br/>
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)<br/>

Solution

  • Put this properties to false at struts.properties:

    struts.configuration.xml.reload=false
    struts.devMode = false
    struts.i18n.reload=false