Error java.lang.NullPointerException: sequence must not be null triggered during migration data to Jira Cloud

Platform Notice: Cloud and Data Center - This article applies equally to both cloud 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

Summary

While migrating data from Jira Server / Data Center instance to Jira Cloud the following error is triggered and prevents the migration process:

ERROR COBRA project-export We couldn't export Custom Field Option List <FIELD_ID>. Reason: java.lang.NullPointerException: sequence must not be null

Diagnosis

No data could be found in *Custom Field* related DB tables while trying to find additional information about <FIELD_ID> mentioned in error or some other fields with NULL values. Below SQL queries return empty results:

1 2 3 4 5 SELECT * FROM customfieldoption WHERE id = <FIELD_ID>; SELECT * FROM customfieldoption WHERE customfield = <FIELD_ID>; SELECT * FROM customfield WHERE id = <FIELD_ID>; SELECT customfield FROM customfieldoption WHERE customfield NOT IN (SELECT id FROM customfield); SELECT c.cfname AS "Custom Field", o.customvalue AS "Value" FROM customfield c JOIN customfieldoption o ON c.id = o.customfield WHERE customvalue IS NULL;

Cause

The mentioned in error ID actually belongs not to CUSTOMFIELDCONFIG field and indicates that some associated SEQUENCE fields values has null values at CUSTOMFIELDOPTION table. The null value for that field will trigger mentioned error during migration.

Solution

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.

The solution would be to remove such entries that have null values or update them with some non-null values:

1. Review the outcome of the following SQL query to check if you have entries with null SEQUENCE field(-s):

1 SELECT * FROM CUSTOMFIELDOPTION WHERE SEQUENCE IS NULL ORDER BY CUSTOMFIELDCONFIG, SEQUENCE

2. If there will be any entries returned you could simply delete them after the review:

1 DELETE FROM CUSTOMFIELDOPTION WHERE SEQUENCE IS NULL

3. Or better update the SEQUENCE field with some non-null values (where <LIST_OF_IDs> is IDs of CUSTOMFIELD records returned by the first query):

1 UPDATE CUSTOMFIELDOPTION SET SEQUENCE=10 WHERE CUSTOMFIELD IN (<LIST_OF_IDs>)
Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.