How to get rid of *access denied* Exceptions when deploying Spring On Tomcat?

While I was deploying Spring, I got the following Exception,

java.security.AccessControlException: access denied (java.util.PropertyPermission cglib.debugLocation read)

The fix for such "access denied" is as follows,

  • Open [CATALINA_HOME]/conf/policy.d/04webapps.policy (ON UBUNTU)
  • Add the following to that file inside the grant{} block
    permission java.util.PropertyPermission "cglib.debugLocation","read";

Likewise, for

access denied (java.lang.RuntimePermission getProtectionDomain)

Add this,

permission java.lang.RuntimePermission "getProtectionDomain";
Categories: Linux, Java, Tomcat, Spring
Written on November 21, 2010