Project import from XML backup fails with error "import was aborted because too many errors"

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

Project import using XML backup fails abruptly with below error on the UI:

1 The import was aborted because too many errors. Some are listed below. For details about the errors please see your logs. Please note that some elements have been created. You may want to consult your logs to see what caused the errors, delete the project, and perform the import again.

Environment

Jira 8.x or 9.x

Cause and diagnosis

There could be multiple reasons for the failure and some are listed below and you will need to check the log file <JIRA_HOME>/log/atlassian-jira.log for more details.

Root Cause 1 - Number Format Exception while parsing version history data

If you see the error below in the Jira log file, then this root cause is relevant:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2023-04-26 06:24:51,865+0000 JiraTaskExecutionThread-30 ERROR user 384x98545x1 iedx6v 203.xyz.xyz.xyz,10.xyz.xyz.xyz,10.xyz.xyz.xyz /secure/admin/ProjectImportSummary.jspa [c.a.j.imports.project.DefaultProjectImportService] An unexpected error occurred while importing the project with key: PROJEC-KEY java.lang.NumberFormatException: For input string: "[31551]" at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(Unknown Source) at java.base/jdk.internal.math.FloatingDecimal.parseDouble(Unknown Source) at java.base/java.lang.Double.parseDouble(Unknown Source) at java.base/java.lang.Double.<init>(Unknown Source) at com.atlassian.jira.imports.project.customfield.VersionCustomFieldImporter.getNonDecimalValue(VersionCustomFieldImporter.java:36) at com.atlassian.jira.imports.project.customfield.VersionCustomFieldImporter.getMappedImportValue(VersionCustomFieldImporter.java:26) at com.atlassian.jira.imports.project.transformer.ChangeItemTransformerImpl.mapCustomFieldIdList(ChangeItemTransformerImpl.java:73) at com.atlassian.jira.imports.project.transformer.ChangeItemTransformerImpl.transform(ChangeItemTransformerImpl.java:53) at com.atlassian.jira.imports.project.handler.ChangeItemPersisterHandler.handleEntity(ChangeItemPersisterHandler.java:54) at com.atlassian.jira.imports.project.handler.ChainedOfBizSaxHandler.endTopLevelElement(ChainedOfBizSaxHandler.java:221) at com.atlassian.jira.imports.project.handler.ChainedOfBizSaxHandler.endElement(ChainedOfBizSaxHandler.java:169) at com.atlassian.jira.imports.project.handler.ChainedOfBizSaxHandler.endElement(ChainedOfBizSaxHandler.java:136) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at com.atlassian.security.xml.RestrictedXMLReader.parse(RestrictedXMLReader.java:103) at com.atlassian.jira.imports.xml.DefaultBackupXmlParser$XmlParser.parseXml(DefaultBackupXmlParser.java:115) at com.atlassian.jira.imports.xml.DefaultBackupXmlParser.parse(DefaultBackupXmlParser.java:64) at com.atlassian.jira.imports.xml.DefaultBackupXmlParser.parseXml(DefaultBackupXmlParser.java:52) at com.atlassian.jira.imports.xml.DefaultBackupXmlParser.parseOfBizBackupXml(DefaultBackupXmlParser.java:41) at com.atlassian.jira.imports.project.DefaultProjectImportManager.importChangeItemEntities(DefaultProjectImportManager.java:1104) at com.atlassian.jira.imports.project.DefaultProjectImportManager.doImport(DefaultProjectImportManager.java:647) at com.atlassian.jira.bc.imports.project.DefaultProjectImportService.doImport(DefaultProjectImportService.java:416) at com.atlassian.jira.web.action.admin.importer.project.ProjectImportSummary$ProjectImportCallable.call(ProjectImportSummary.java:285) at com.atlassian.jira.web.action.admin.importer.project.ProjectImportSummary$ProjectImportCallable.call(ProjectImportSummary.java:236) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:533) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:491) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:216) at java.base/java.lang.Thread.run(Unknown Source)

Root Cause 2 - Nullpointer exception while parsing version data

If you see the error below in the Jira log file, then this root cause is relevant:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 2023-06-02 11:59:06,853+0000 ISSUE-indexQueue:thread-1 INFO [c.a.j.imports.project.DefaultProjectImportPersister] Re-indexing is 100% complete. Current index: 2023-06-02 11:59:06,861+0000 JiraTaskExecutionThread-31 INFO user 718x122668x1 203.xyz.xyz.xyz,10.xyz.xyz.xyz,10.xyz.xyz.xyz /secure/admin/ProjectImportSummary.jspa [c.a.j.imports.project.DefaultProjectImportManager] Finished re-indexing the Project. 2023-06-02 11:59:06,861+0000 JiraTaskExecutionThread-31 ERROR user 718x122668x1 8mi3ad 203.xyz.xyz.xyz,10.xyz.xyz.xyz,10.xyz.xyz.xyz /secure/admin/ProjectImportSummary.jspa [c.a.j.imports.project.DefaultProjectImportService] An unexpected error occurred while importing the project with key: PROJEC-KEY java.lang.NullPointerException at com.atlassian.jira.imports.project.customfield.VersionCustomFieldImporter.getMappedImportValue(VersionCustomFieldImporter.java:29) at com.atlassian.jira.imports.project.transformer.CustomFieldValueTransformerImpl.transform(CustomFieldValueTransformerImpl.java:56) at com.atlassian.jira.imports.project.handler.CustomFieldValuePersisterHandler.handleEntity(CustomFieldValuePersisterHandler.java:53) at com.atlassian.jira.imports.project.handler.ChainedOfBizSaxHandler.endTopLevelElement(ChainedOfBizSaxHandler.java:221) at com.atlassian.jira.imports.project.handler.ChainedOfBizSaxHandler.endElement(ChainedOfBizSaxHandler.java:169) at com.atlassian.jira.imports.project.handler.ChainedOfBizSaxHandler.endElement(ChainedOfBizSaxHandler.java:136) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at com.atlassian.security.xml.RestrictedXMLReader.parse(RestrictedXMLReader.java:103) at com.atlassian.jira.imports.xml.DefaultBackupXmlParser$XmlParser.parseXml(DefaultBackupXmlParser.java:115) at com.atlassian.jira.imports.xml.DefaultBackupXmlParser.parse(DefaultBackupXmlParser.java:64) at com.atlassian.jira.imports.xml.DefaultBackupXmlParser.parseXml(DefaultBackupXmlParser.java:52) at com.atlassian.jira.imports.xml.DefaultBackupXmlParser.parseOfBizBackupXml(DefaultBackupXmlParser.java:41) at com.atlassian.jira.imports.project.DefaultProjectImportManager.importCustomFieldValues(DefaultProjectImportManager.java:935) at com.atlassian.jira.imports.project.DefaultProjectImportManager.doImport(DefaultProjectImportManager.java:632) at com.atlassian.jira.bc.imports.project.DefaultProjectImportService.doImport(DefaultProjectImportService.java:416) at com.atlassian.jira.web.action.admin.importer.project.ProjectImportSummary$ProjectImportCallable.call(ProjectImportSummary.java:285) at com.atlassian.jira.web.action.admin.importer.project.ProjectImportSummary$ProjectImportCallable.call(ProjectImportSummary.java:236) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:533) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:491) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:216) at java.base/java.lang.Thread.run(Unknown Source)

Solution

Solution for Root Cause 1

Please refer to the workaround section from the bug JRASERVER-65494 - ChangeItem data of Version custom field cause exception during project import

Solution for Root Cause 2

Please upgrade to Jira 9.11.0 (or later). If that is not feasible refer to the workaround section from the bug JSWSERVER-21769 - Project Import Using XML back-up fails with NullPointerException

  1. Check if you have the correct field context available on both target and source env for all the version-type custom fields. Validation for the field and its availability will be checked during the import validation step however if it is missing on the target, the chances of running into NPE (Null Pointer Exception) is high.

  2. Check if all issue types and projects are available for the field context on both target and source env.

  3. The version value itself is not available on the target. You can run below query to find if there are any such stale version data part of the XML back-up. If that's the case, that data needs to be either deleted or fixed:

    1 2 3 4 5 6 7 SELECT jiraissue.id as issue_id, jiraissue.issuetype, project.id as project_id, customfield.id as custom_field_id, customfield.cfname, customfieldvalue.numbervalue FROM jiraissue JOIN customfieldvalue ON customfieldvalue.issue = jiraissue.id JOIN customfield ON customfield.id = customfieldvalue.customfield JOIN project ON project.id = jiraissue.project WHERE project.pkey = 'XYZ-PROJ' AND customfield.customfieldtypekey = 'com.atlassian.jira.plugin.system.customfieldtypes:version' AND customfieldvalue.numbervalue NOT IN (SELECT id from projectversion WHERE projectversion.project = project.id);

In both cases, after fixing the data, you will need to regenerate XML back-up from the source Jira instance.

⚠️ If you are unsure about the steps, please reach out to Atlassian Support as the steps involve DB manipulation operations.

Updated on April 11, 2025

Still need help?

The Atlassian Community is here for you.