Blank page displayed when loading Permission Scheme configuration in Jira Datacenter/Server

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Symptoms

When accessing the Permission Scheme configuration page for a project, a blank page will be displayed and the following error will be thrown in the logs:

java.lang.NullPointerException
at com.atlassian.jira.projectconfig.contextproviders.ProjectPermissionContextProvider.getContextMap(ProjectPermissionContextProvider.java:85)
at com.atlassian.jira.plugin.webfragment.CacheableContextProviderDecorator.initContextMap(CacheableContextProviderDecorator.java:70)
at com.atlassian.jira.plugin.webfragment.CacheableContextProviderDecorator.getContextMap(CacheableContextProviderDecorator.java:46)
at com.atlassian.plugin.web.descriptors.DefaultWebPanelModuleDescriptor$ContextAwareWebPanel.getHtml(DefaultWebPanelModuleDescriptor.java:141)
at com.atlassian.jira.projectconfig.tab.WebPanelTab.getTab(WebPanelTab.java:75)
at com.atlassian.jira.projectconfig.servlet.PanelServlet.outputTab(PanelServlet.java:163)
at com.atlassian.jira.projectconfig.servlet.PanelServlet.doGet(PanelServlet.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.atlassian.plugin.servlet.DelegatingPluginServlet.service(DelegatingPluginServlet.java:42)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.atlassian.plugin.servlet.ServletModuleContainerServlet.service(ServletModuleContainerServlet.java:52)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


The following exception can also appear in the atlassian-jira.log:

TP-Processor10 ERROR      [500ErrorPage.jsp] Exception caught in 500 page null
java.lang.NullPointerException
	at com.atlassian.jira.projectconfig.contextproviders.ProjectPermissionContextProvider.getContextMap(ProjectPermissionContextProvider.java:85)
	at com.atlassian.jira.plugin.webfragment.CacheableContextProviderDecorator.initContextMap(CacheableContextProviderDecorator.java:70)
	at com.atlassian.jira.plugin.webfragment.CacheableContextProviderDecorator.getContextMap(CacheableContextProviderDecorator.java:46)
	at com.atlassian.plugin.web.descriptors.DefaultWebPanelModuleDescriptor$ContextAwareWebPanel.getHtml(DefaultWebPanelModuleDescriptor.java:141)
	at com.atlassian.jira.projectconfig.tab.WebPanelTab.getTab(WebPanelTab.java:75)
	at com.atlassian.jira.projectconfig.servlet.PanelServlet.outputTab(PanelServlet.java:163)
	at com.atlassian.jira.projectconfig.servlet.PanelServlet.doGet(PanelServlet.java:136)

Environment

Jira Server / Data Center on any version from 8.0.0.

Root Cause

We aim to resolve the previous permission scheme that has been corrupted or otherwise removed to a working Permission Scheme. Below are a few resolution steps to associate a new Permission Scheme.

Resolution 1 - Edit via the Jira project admin UI

The preferred resolution is to navigate to your Jira SelectProjectPermissionScheme page and associate your broken Project with a new Permission Scheme.

The steps below detail how to navigate to the URL to associate Permission Schemes.

  1. Identify the affected project ID.
    • Go to ⚙ > Projects
    • Search for the Key or Name of the affected Project
    • In the Actions Column Icon, click the triple dots menu and hover the mouse cursor over the "Edit Menu"
    • In the status bar of the browser in the URL string, you will see the actual PROJECT ID
      • (In the example below, this ID is highlighted in red rectangle - project ID 10202):
  2. Use a known working project to navigate to the page where you associate Project Permissions
    • (question) You can navigate to this page via ⚙ > Projects > Another Project > Project Settings > Permissions > Use a different scheme
    • This will take you to the "Associate Permission Scheme to Project" of the working Project.
    • In the same URL for associating a permission scheme to your working project, capture the URL associated.
      For example:
  3. With this URL, change the project ID of the working Project to the project ID identified in Step 1.
    • (question) In this article, the correct URL would be HTTP://<jira-base-url>/secure/project/SelectProjectPermissionScheme!default.jspa?projectId=10202
    • You will be redirected to associate a Permission Scheme against your affected Project.
  4. Set the default Permission Scheme or any known working Permission Scheme and associate it with your Project.


Additional Note

If you are instead getting the error: "No permission scheme is associated with project" caused when deleting a project missing a permission scheme, please perform a "Project Reindex" before attempting to delete the Project.


Resolution 2 – Direct database update with Default Permission Scheme

Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.


This problem can also be fixed by manually associating the Project to the Default Permission Scheme: 

  1. Identify which projects don't have a Permission Scheme associated with them: 

    SELECT * FROM project WHERE ID NOT IN (SELECT source_node_id FROM nodeassociation WHERE sink_node_entity='PermissionScheme');
  2. Get the ID of the Project (s) returned
  3. Stop Jira

    1. (question) If you are running a cluster environment, please stop all nodes.
  4. Verify you have a Default Permission Scheme:

    SELECT * FROM schemepermissions WHERE scheme = 0;
    • (warning) If you don't have a result from this query, please follow Resolution 3.
  5. Insert the project permission scheme association data into the nodeassociation table:

    INSERT INTO nodeassociation VALUES (<project_id>, 'Project', 0, 'PermissionScheme', 'ProjectScheme', NULL);

    (info)  Replace <project_id> with the id from the query in step 1.

    (info) The query above will map the Default Permission Scheme to the Project.

  6. Start Jira

Resolution 3 - Create a new Default Permission Scheme in your database

Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.

If you have followed step 4 from Resolution 2 to verify if a Default Permission Scheme is extant and there is no results, you will need to re-create a Default Permission Scheme to return normal functionality for any new projects. Below are the steps to restore the Default Permission Scheme via the database:

  1. Find a currently working Permission Scheme in your Jira application and copy it.
    •  You can do this as a Jira Administrator via ⚙ > Issues  > Permission Schemes > Actions (Copy)
    • Rename this new scheme to be appropriate as a default Permission Scheme.
  2. Navigate to the new Permission Scheme via the Actions (Permissions) link, and check the schemeID value that has been created.
    • In the below example, the new SchemeID is 10001
  3. Stop Jira
  4. Update the new schemeID of your cloned permission scheme to 0 (the default permission scheme value)

    UPDATE schemepermissions SET scheme = 0 WHERE scheme = <cloned-schemeid>;
  5. Start Jira
Last modified on Nov 26, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.