Unable to create new project, can't assign default permission scheme

Still need help?

The Atlassian Community is here for you.

Ask the community

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

Problem

When creating a new project, a java.lang.NullPointerException will be thrown

  • Seems like JIRA cant assign the new project to the Default Permission Scheme

The following appears in the atlassian-jira.log

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:144)
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)

Diagnosis

Environment

  • A modification of the permission scheme table was done
  • The original default permission scheme is missing/deleted. Is this is missing, JIRA will encounter the nullpointerException error as it cant find the default permission scheme.

Diagnostic Steps

 select * from permissionscheme;

 select * from project where id not in (SELECT source_node_id FROM nodeassociation where sink_node_entity = 'PermissionScheme');
  • 1st query - Verify if the default permission scheme with id = 0 exist
  • 2nd query - To filter out which project has lost the permission scheme 


Cause

Missing default permission scheme.

Resolution

tip/resting Created with Sketch.

Backup up your JIRA prior to below action

  1. Go to JIRA Administration , Issues > Permission Scheme
  2. Create a new permission scheme called JIRA Default Permission Scheme, with default permission setup
  3. Do not assign any project to this permission
  4. Stop JIRA
  5. Go to database
  6. select * from permissionscheme; to find the newly created JIRA Default Permission Scheme
  7. Note the ID, will be shown as xxx in below query. Replace accordingly.

  8. update permissionscheme set ID=0 where ID=xxxx

  9. Start JIRA

Last modified on Nov 14, 2018

Was this helpful?

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