500 Error Page when Copying a Permission Scheme

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

Summary

Symptoms

Copying a permission scheme results in a 500 Error page with this error:

1 2 3 4 5 6 7 8 9 10 Referer URL: <JIRA_URL>/secure/admin/ViewPermissionSchemes.jspa java.lang.NullPointerException java.lang.NullPointerException at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187) at com.atlassian.jira.security.plugin.ProjectPermissionKey.<init>(ProjectPermissionKey.java:28) at com.atlassian.jira.permission.DefaultPermissionSchemeManager.makeSchemeEntity(DefaultPermissionSchemeManager.java:407) at com.atlassian.jira.scheme.AbstractSchemeManager.copyScheme(AbstractSchemeManager.java:669) at com.atlassian.jira.scheme.AbstractSchemeManager.copyScheme(AbstractSchemeManager.java:708) at com.atlassian.jira.scheme.AbstractCopyScheme.doExecute(AbstractCopyScheme.java:18) ...

Diagnosis

A copy of the permission scheme is still created, but certain groups/roles/users are removed from certain permissions.

Cause

There are corrupted entries in the database for the permission scheme. Running this SQL query will list them down:

1 SELECT * FROM schemepermissions where permission_key is null and scheme is not null;

This is a sample result:

(Auto-migrated image: description temporarily unavailable)

Project Roles 10002 and 10000 are assigned to permission -1 which has NULL permission key in scheme 0 (default permission scheme).

Solution

Resolution

  • ⚠️ Back up JIRA first

  • Run this SQL query to delete the corrupted entries

    1 DELETE FROM schemepermissions where permission_key is null and scheme is not null;
  • Restart JIRA

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.