NullPointerException: issue links to a non-existing issue

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

Platform Notice: Server, Data Center, and Cloud By Request - This article was written for the Atlassian server and data center platforms but may also be useful for Atlassian Cloud customers. If completing instructions in this article would help you, please contact Atlassian Support and mention it.

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

  • NullPointerException thrown in the Issue Screen when creating sub-tasks e.g. 
  • A stacktrace similar to the following may also be thrown in the UI when trying to delete an issue

    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 appears in the atlassian-jira.log

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

Resolution

This can be fixed by JIRA's Database Integrity Checker

  • Run the integrity checker: navigate through Administration Menu > System > System Support > Integrity Checker
  • Ensure that all options under 'Check Issue Relations' are selected, and then click the 'check' button.
  • click to Fix all errors found

Last modified on Apr 17, 2024

Was this helpful?

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