Project Permissions page throws NullPointerException in Jira server
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
Symptoms
When administrators tries to access the permissions tab on the Project Administration page, a java.lang.NullPointerException is thrown.
The following appears in the atlassian-jira.log
:
1
2016-01-13 22:58:10,993 http-nio-8080-exec-23 WARN test 1378x104376x1 40dvcs 10.0.2.56 /plugins/servlet/project-config/TES/permissions [c.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'java.lang.NullPointerException - null'.
Or you may see the following error from the UI:
1
2
3
4
5
6
7
8
9
java.lang.NullPointerException
java.lang.NullPointerException
at java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469) [?:1.8.0_102]
at java.util.TimSort.binarySort(TimSort.java:296) [?:1.8.0_102]
at java.util.TimSort.sort(TimSort.java:221) [?:1.8.0_102]
at java.util.Arrays.sort(Arrays.java:1512) [?:1.8.0_102]
at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:348) [?:1.8.0_102]
at java.util.stream.Sink$ChainedReference.end(Sink.java:258) [?:1.8.0_102]
...
Cause
This error is caused by invalid entries for project permissions.
Resolution
Backup
The following changes are irreversible. Please ensure that the JIRA database backup is taken before proceeding to the resolution steps. It is also recommended that JIRA is taken out of service before starting the database backup.
Run the following query to confirm there are invalid entries:
1 2 3 4
select * from nodeassociation where association_type = 'ProjectScheme' and not exists (select 'x' from project where project.id = source_node_id);
Stop JIRA
Run the following query to delete the invalid entries:
1 2 3 4
delete from nodeassociation where association_type = 'ProjectScheme' and not exists (select 'x' from project where project.id = source_node_id);
Restart JIRA
Was this helpful?