Struts 2 on GAE – java.security.AccessControlException: access denied

Problem

Developing Struts2 (v 2.3.1.2) on Google App Engine (SDK v1.6.3.1), local development, hit “java.security.AccessControlException: access denied” error?

struts 2 on gae access denied error

Solution

Normally, this is because you turn the “devMode on” in struts.xml file.

File : struts.xml


<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
 
<struts>
	<constant name="struts.devMode" value="true" /> 
	//...
</struts>

When you turn devMode on, Struts2 will try to write to the disk for logging, which is denied by GAE, it can only write to Google data store.

To solve it, you have to delete the devMode statement in your struts.xml file.

Note
In short, Struts 2 devMode is not support in GAE environment.

Reference

  1. struts 2.1.8 met AccessControlException with app engine’s local server

About the Author

author image
mkyong
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
dev Recent comment authors
newest oldest most voted
dev
Guest
dev

java.security.AccessControlException: access denied

still ther problem contenued i have removed the dev mode