Project import fails with ParseException error for missing fields in Jira server
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
Symptoms
Project import fails complaining about some customfieldvalues not mapped to any issue
The following appears in the atlassian-jira.log
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2012-06-20 21:36:32,487 JiraTaskExectionThread-3 WARN admin 1296x491x1 1dqndhd 10.60.1.160 /secure/admin/ProjectImportSelectProject.jspa [imports.project.handler.ChainedSaxHandler] Encountered a parsing exception.
com.atlassian.jira.exception.ParseException: No 'issue' field for CustomFieldValue '474431'.
at com.atlassian.jira.imports.project.parser.CustomFieldValueParserImpl.parse(CustomFieldValueParserImpl.java:46)
at com.atlassian.jira.imports.project.handler.CustomFieldMapperHandler.handleEntity(CustomFieldMapperHandler.java:34)
at com.atlassian.jira.imports.project.handler.ChainedSaxHandler.endTopLevelElement(ChainedSaxHandler.java:239)
at com.atlassian.jira.imports.project.handler.ChainedSaxHandler.endElement(ChainedSaxHandler.java:184)
at com.atlassian.jira.imports.project.handler.ChainedSaxHandler.endElement(ChainedSaxHandler.java:139)
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 org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at com.atlassian.jira.imports.xml.DefaultBackupXmlParser.parseBackupXml(DefaultBackupXmlParser.java:51)
at com.atlassian.jira.imports.project.DefaultProjectImportManager.getProjectImportData(DefaultProjectImportManager.java:292)
at com.atlassian.jira.bc.imports.project.DefaultProjectImportService.getProjectImportData(DefaultProjectImportService.java:610)
at com.atlassian.jira.web.action.admin.importer.project.ProjectImportSelectProject$MappingResultCallable.call(ProjectImportSelectProject.java:244)
Diagnosis
Run the below SQL query to retrieve those customfield values:
1
SELECT * FROM customfieldvalue WHERE issue IS NULL;
Cause
One or more custom fields has a null value in a field where an issue ID is expected.
Solution
Resolution
Complete a full restore to a temporary JIRA instance.
Run this SQL in the temporary JIRA instance to delete the rows with null issue references:
1
DELETE FROM customfieldvalue WHERE issue IS NULL;
Create a new XML backup from the temporary instance and use it to complete your project import.
Alternate method (on source instance):
Stop Jira.
Make a clone of the Jira database.
Modify the dbconfig.xml file to point to the cloned database.
Remove the null values from the cloned database.
Start Jira.
Create a new backup.
Stop Jira.
Point it back to the original database in the dbconfig.xml file.
Start Jira.
Related links
Was this helpful?