Jira throws 'There are no issue type mappings for this scheme. This should never occur as the default entry should always exist!' message

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

Problem

In the default Issue Type scheme, you will see the following error:

(Auto-migrated image: description temporarily unavailable)

The following appears in the logs

1 2 3 /secure/admin/ConfigureIssueTypeScreenScheme.jspa [webwork.util.ValueStack] query="/issueTypeScreenSchemeEntities/empty" {[id="null" type="5" values=""]} {[id="issueTypeScreenSchemeEntities" type="8" values=""]} {[id="empty" type="8" values=""]} java.lang.reflect.InvocationTargetException
1 2 3 Caused by: java.lang.NullPointerException at com.atlassian.jira.issue.comparator.IssueTypeKeyComparator.compare(IssueTypeKeyComparator.java:36) at com.atlassian.jira.issue.fields.screen.issuetype.IssueTypeScreenSchemeEntityImpl.compareTo(IssueTypeScreenSchemeEntityImpl.java:156)

Diagnosis

Run the following SQL query to determine if you are affected by this issue:

1 select * from issuetypescreenschemeentity where issuetype not in (select id from issuetype);

If you are affected, this should return a results, else if there are no results from the above query, then you are not affected by this issue.

Cause

The issue occurs because there are issue types referenced in the issuetypescreenschemeentity table, however, they do not exist in the issuetype table.

Solution

Resolution

  1. Shut down Jira

  2. Run the following query to delete entries in the issuetypescreenschemeentity table that are invalid as they reference deleted/removed issue types.

    1 delete from issuetypescreenschemeentity where issuetype not in (select id from issuetype);

    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.

  3. Start back Jira and verify if the issue persists

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.