We couldn't export Workflow java.lang.NullPointerException: it must not be null
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
Check what to do when the data preparation preflight check fails with a NullPointerException (NPE) while exporting workflows.
Overview
While migrating from On-Premise to Cloud, the Data preparation preflight check fails.
Clicking Download ZIP File reveals the below error message in the log files:
1
ERROR <pkey> project-export We couldn't export Workflow '<workflow_name>'. Reason: java.lang.NullPointerException: it must not be null. [JCMA 000]
The error indicates that there is either a null or missing value for a linked status in the workflow.
Troubleshooting
Generate a support zip to get further insights on the error message.
Search for the error in the application-logs/atlassian-jira.migration.log file.
1 2 3 4 5 6 7
ERROR <pkey> project-export We couldn't export Workflow '<workflow_name>'. Reason: java.lang.IllegalArgumentException. [JCMA 000] ERROR ... Exporting entity Workflow '<workflow_name>' failed java.lang.IllegalArgumentException at com.atlassian.jira.workflow.AbstractJiraWorkflow.getLinkedStep(AbstractJiraWorkflow.java:204) at com.atlassian.jira.migration.export.core.workflow.SwfExportFacade.getAllValidSteps(SwfExportFacade.kt:165) at com.atlassian.jira.migration.export.core.workflow.SwfExportFacade.isValidStep(SwfExportFacade.kt:169)
From the stack trace, you can see the method failing is getLinkedStep()
Navigate to the workflow and check for any null values:
Click ⚙ > Issues.
Click Workflows.
Identify the affected workflow.
Click Edit.
Check for any missing Linked Status.
In the below example, note the invalid statuses in the Linked Status for the Steps Fail, Pass, and Retest, along with the associated transitions.

Solution
Edit the steps that have invalid Linked Status, assign a valid status to them, and retry the migration.
Was this helpful?