java.security.AccessControlException error when attempting to start Confluence

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

When you attempt to run Confluence, you may get the following error:

1 2 3 4 java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers) at java.security.AccessControlContext.checkPermission(AccessControlContext.java(Compiled Code)) at java.security.AccessController.checkPermission(AccessController.java(Compiled Code)) at java.lang.SecurityManager.checkPermission(SecurityManager.java(Compiled Code))

Cause

Confluence relies on a number of Java libraries. Some of these libraries make use of features of the Java language that may be restricted by Java security policies.

This does not normally cause any problems. The default security configuration of most application servers will happily run Confluence. However, in some shared-hosting or enterprise environments, security settings may be such that Confluence cannot function.

Resolution

The permissions required by Confluence to run are detailed in the sample policy file below. You may need to give this information to your systems administrator so that they can be deployed with the Confluence application.

1 2 3 4 5 6 7 8 9 grant codeBase "file:${catalina.home}/webapps/confluence/-" { permission java.security.AllPermission; }; grant { permission java.lang.RuntimePermission "accessDeclaredMembers"; permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; permission java.lang.RuntimePermission "defineCGLIBClassInJavaPackage"; };
Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.