Exporting entity Issue failed with java.lang.NullPointerException
Platform Notice: Data Center - This article 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
Learn what to do when your project migration with the Jira Cloud Migration Assistant (JCMA) fails with "Exporting entity Issue <issue-key> failed".
Overview
When migrating from Jira On-Premise to Cloud, the migration plan fails with the above error message message.
The error comes along with the below signature in the application log file atlassian-jira.log:
Exporting entity Issue <issue-key> failed
com.atlassian.cache.CacheException: java.lang.NullPointerException
at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:214)
at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:165)
at com.atlassian.cache.impl.metrics.InstrumentedCache.get(InstrumentedCache.java:72)
at com.atlassian.jira.issue.fields.config.persistence.CachedFieldConfigSchemePersister.getConfigSchemesForCustomField(CachedFieldConfigSchemePersister.java:111)
at com.atlassian.jira.issue.fields.config.manager.FieldConfigSchemeManagerImpl.getConfigSchemesForField(FieldConfigSchemeManagerImpl.java:66)
at com.atlassian.jira.issue.fields.ImmutableCustomField.getConfigurationSchemes(ImmutableCustomField.java:1213)
This happens when cascading custom fields have contexts assigned to a project limiting the kind of Issue Types, but in the past, there were issue types assigned that have the custom field assigned in issues.
As an example, if a context was in the past restricted to Bug and Defect issue types only, and then later on it was restricted to the issue type of Bug only, you will see such a failure as the issues would have data from this custom field with issue type Defect.
Solution
Identify what are the issue types used in the project with the below query, replacing "<pkey>" with the affected project key:
SELECT count(*) , it.pname FROM jiraissue ji JOIN issuetype it ON ji.issuetype = it.id WHERE pkey = '<pkey>' GROUP BY it.pname;
- Filter for custom fields that are of type cascading.
- Go to ⚙ > Issues.
- Click on Custom Fields.
- Select Type as "Select List (cascading)".
- Select Project with the affected project.
- Audit all the custom fields you see in this list, making sure there are only valid ussue types.
- Verify that all the issue types in use on the project from the SQL query above are selected in the applicable issue types in the context.