Creating or deleting issues in Jira fails with NullPointerException

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

A NullPointerException error is thrown when trying to create or delete issues:

(Auto-migrated image: description temporarily unavailable)

Environment

Jira Data Center on any version.

Diagnosis

A stacktrace similar to the following may be thrown in the UI when trying to delete an issue:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 java.lang.NullPointerException java.lang.NullPointerException at com.atlassian.jira.issue.IssueFactory$1.transform(IssueFactory.java:79) at org.apache.commons.collections.CollectionUtils.collect(CollectionUtils.java:632) at org.apache.commons.collections.CollectionUtils.collect(CollectionUtils.java:610) at org.apache.commons.collections.CollectionUtils.collect(CollectionUtils.java:575) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssueObjects(DefaultIndexManager.java:362) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndex(DefaultIndexManager.java:382) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndex(DefaultIndexManager.java:375) at sun.reflect.GeneratedMethodAccessor1258.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:83) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28) at com.sun.proxy.$Proxy131.reIndex(Unknown Source) at com.atlassian.jira.issue.link.DefaultIssueLinkManager.reindexLinkedIssues(DefaultIssueLinkManager.java:149) at com.atlassian.jira.issue.link.DefaultIssueLinkManager.removeIssueLinkInternal(DefaultIssueLinkManager.java:240)

The following WARN/ERROR messages appear in the atlassian-jira.log:

1 2 3 4 5 6 2015-08-15 21:37:52,193 http-bio-9002-exec-21 WARN xxx 1297x29965x1 yyy 10.28.0.12,127.0.0.1 /browse/BGBD-65 [jira.issue.link.LinkCollectionImpl] Issue [id=29010] links to a non-existing issue! ... 2015-08-15 21:38:12,302 http-bio-9002-exec-42 ERROR xxx 1298x30005x1 yyy 10.28.0.12,127.0.0.1 /secure/QuickCreateIssue.jspa [jira.quickedit.action.QuickCreateIssue] java.lang.NullPointerException java.lang.NullPointerException at com.atlassian.jira.issue.link.DefaultIssueLinkManager.getIssueLink(DefaultIssueLinkManager.java:493) at com.atlassian.jira.issue.link.DefaultIssueLinkManager.createIssueLink(DefaultIssueLinkManager.java:101)

Cause

This is a data integrity issue. There may be some issue links pointing to non-existent Jira issue IDs in the database.

Solution

This can be fixed by running Jira's Database Integrity Checker:

  • Navigate to Jira Administration > System > SYSTEM SUPPORT > Integrity checker

  • Ensure that all options under 'Check Issue Relations' are selected, and then click the 'Check' button.

  • Click on 'Fix' to fix all the errors found.

Updated on April 1, 2025

Still need help?

The Atlassian Community is here for you.