Project import fails with ParseException error for missing fields in Jira server

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Project import fails complaining about some customfieldvalues not mapped to any issue

The following appears in the atlassian-jira.log:

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:

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.

Resolution

  1. Complete a full restore to a temporary JIRA instance.
  2. Run this SQL in the temporary JIRA instance to delete the rows with null issue references:

    DELETE FROM customfieldvalue WHERE issue IS NULL;
  3. Create a new XML backup from the temporary instance and use it to complete your project import.

Alternate method (on source instance):

  1. Stop Jira.
  2. Make a clone of the Jira database.
  3. Modify the dbconfig.xml file to point to the cloned database.
  4. Remove the null values from the cloned database.
  5. Start Jira.
  6. Create a new backup.
  7. Stop Jira.
  8. Point it back to the original database in the dbconfig.xml file.
  9. Start Jira.


JRASERVER-34373 - Getting issue details... STATUS

Last modified on Feb 25, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.