Jira Data Center functionality fails due to the error The Project argument and its backing generic value must not be null
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 Upgrading Jira, restoring the XML backup displays the below error.
Accessing permissions displays the below error.
1
2
3
4
5
java.lang.IllegalArgumentException: The Project argument and its backing generic value must not be null
at com.atlassian.jira.security.AbstractPermissionManager.hasPermission(AbstractPermissionManager.java:171)
at com.atlassian.jira.security.AbstractPermissionManager.hasPermission(AbstractPermissionManager.java:159)
at sun.reflect.GeneratedMethodAccessor219.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Cause
There are project versions that refer to non-existent projects in the database. If restoring an XML backup, this will contain those improper values.
Resolution
Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
The issue can be rectified by removing the bad version entries in the database, by running the queries below in the database:
Find the project version that is referring to non-existent projects:
1
SELECT * FROM projectversion WHERE project NOT IN (SELECT id FROM project);
Make sure that no issues are referencing to the bad version entries:
1 2 3 4 5 6 7 8
SELECT p.pkey, i.issuenum, a.* FROM jiraissue i JOIN nodeassociation a ON i.id = a.source_node_id JOIN project p ON i.project = p.id WHERE a.association_type IN ( 'IssueVersion', 'IssueFixVersion' ) AND a.sink_node_id IN ( SELECT id FROM projectversion WHERE project NOT IN (SELECT id FROM project) );
Remove the bad entry from the database:
1 2
DELETE FROM projectversion WHERE project NOT IN (SELECT id FROM project);
ℹ️ If the above does not solve the problem, please see JIRA: System Error When Project Administrator Trying to Access the Permission Page for further information as it may be related.
Was this helpful?