Cannot delete issues in Jira due to the error "NullPointerException at DefaultIssueDeleteHelper.removeSubTasks"

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

Trying to delete a Jira issue results in an error.

Diagnosis

  • The delete issue dialog may hint that some subtasks will be deleted when deleting that issue, but you may perhaps be unable to find some of the subtasks hinted on the delete issue screen.
  • If you find an error similar to the one below in the atlassian-jira.log file, then this KB article is relevant:

    2016-02-23 17:23:15,018 http-nio-80-exec-5 ERROR      [o.a.c.c.C.[.[localhost].[/].[action]] Servlet.service() for servlet [action] in context with path [] threw exception [java.lang.NullPointerException] with root cause
    java.lang.NullPointerException
    	at com.atlassian.jira.issue.managers.DefaultIssueDeleteHelper.removeSubTasks(DefaultIssueDeleteHelper.java:245)
    	at com.atlassian.jira.issue.managers.DefaultIssueDeleteHelper.deleteIssue(DefaultIssueDeleteHelper.java:129)
    	at com.atlassian.jira.issue.managers.DefaultIssueManager.deleteIssue(DefaultIssueManager.java:897)
    	at com.atlassian.jira.bc.issue.DefaultIssueService.delete(DefaultIssueService.java:392)
    	at com.atlassian.jira.bc.issue.DefaultIssueService.delete(DefaultIssueService.java:362)
    	at com.atlassian.jira.web.action.issue.DeleteIssue.doExecute(DeleteIssue.java:27)

Cause

This is a database-integrity issue. Jira may be making reference to sub-tasks that no longer exist.

Workaround

  1. Run the Database Integrity Checker and fix all errors.
  2. Run a Jira Re-indexing after step #1


Last modified on Sep 14, 2023

Was this helpful?

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