Project Import of Software project fails with Unexpected import failure

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.


While performing a project import , the project import fails. 

The following appears in the atlassian-jira.log

2016-01-28 21:17:46,155 JiraTaskExectionThread-3 DEBUG jira 1277x1055x1 1y08lty /secure/admin/ProjectImportSelectProject.jspa [] Starting parsing Document with ChainedAoSaxHandler
2016-01-28 21:17:47,676 JiraTaskExectionThread-3 ERROR jira 1277x1055x1 1y08lty /secure/admin/ProjectImportSelectProject.jspa [c.a.j.imports.xml.DefaultBackupXmlParser] Unexpected import failure
	at com.atlassian.greenhopper.imports.LexorankPreImportHandler.addFieldMapping(
	at com.atlassian.greenhopper.imports.LexorankPreImportHandler.handleEntity(
	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(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.jira.imports.xml.DefaultBackupXmlParser$XmlParser.parseXml(
	at com.atlassian.jira.imports.xml.DefaultBackupXmlParser.parse(
	at com.atlassian.jira.imports.xml.DefaultBackupXmlParser.parseXml(
	at com.atlassian.jira.imports.xml.DefaultBackupXmlParser.parseAoBackupXml(
	at com.atlassian.jira.imports.project.DefaultProjectImportManager.getAoProjectImportData(
	at com.atlassian.jira.imports.project.DefaultProjectImportManager.getProjectImportData(
	at com.atlassian.jira.bc.imports.project.DefaultProjectImportService.getProjectImportData(
	at com.atlassian.jira.web.action.admin.importer.project.ProjectImportSelectProject$
	at com.atlassian.jira.web.action.admin.importer.project.ProjectImportSelectProject$
	at com.atlassian.jira.task.TaskManagerImpl$
	at com.atlassian.jira.task.TaskManagerImpl$
	at java.util.concurrent.Executors$
	at com.atlassian.jira.task.ForkedThreadExecutor$
2016-01-28 21:17:47,677 JiraTaskExectionThread-3 ERROR jira 1277x1055x1 1y08lty /secure/admin/ProjectImportSelectProject.jspa [c.a.j.imports.project.DefaultProjectImportService] There was an unexpected problem processing the file '/opt/data/jira/import/' when performing a project import.


The rank values in the database (exported to activeobjects.xml) refer to a non-existing LexoRank field which causes the project import to fail.

This could be caused by the bug below, after removing duplicated LexoRank fields:

Resolution 1

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

  • Run the following SQL against the source JIRA's database to remove any orphaned rank values:
  AND "FIELD_ID" NOT IN (SELECT id FROM customfield 
                         WHERE customfieldtypekey = 'com.pyxis.greenhopper.jira:gh-lexo-rank');
  • Lock and Reindex JIRA
  • Generate a new XML backup and use that for the project import

Resolution 2

  • If Resolution 1 does not work, another possibility is that the AO_60DB71_LEXORANK table contains multiple entries pointing to invalid rank fields, with the FIELD_ID indicated being a large negative number. You can find them by using this SQL query:

    WHERE "FIELD_ID" < 0

    If this returns more than a couple of rows, do the following:

(warning) *Since this will require modifying data directly in the database, it is important to do a backup of your database before the procedure as well as attempting a backup of the target instance before doing the System Restore*

  1. Stop the source instance (where the XML Backup used for the project import was generated)
  2. Clean up the Lexorank table by executing the following SQL command (Please notice - this step will delete all ranking data for all issues in JIRA):

  3. Obtain the Rank FIELD ID(s) from your database by running the following SQL query:

    SELECT * FROM customfield WHERE customfieldtypekey = 'com.pyxis.greenhopper.jira:gh-lexo-rank';
  4. Insert the initial lexorank markers by running the following SQL queries. Notice the <Rank FIELD_ID> will need to be replaced with the actual rank field id from your database (step 3 above). If there's more than one rank field, the markers will need to be inserted for all the rank fields)

    INSERT INTO "AO_60DB71_LEXORANK" ("ID", "FIELD_ID", "ISSUE_ID", "RANK", "TYPE") VALUES (DEFAULT, <Rank FIELD_ID>, -9223372036854775808, '0|000000:', 0);
    INSERT INTO "AO_60DB71_LEXORANK" ("ID", "FIELD_ID", "ISSUE_ID", "RANK", "TYPE") VALUES (DEFAULT, <Rank FIELD_ID>, 9223372036854775807, '0|zzzzzz:', 2);
  5. Start JIRA
  6. Run a full Reindex (JIRA Administration > System > Indexing), any of the available options will work.
  7. Generate a new XML backup
  8. Perform the Project Import in the target instance.

Last modified on Oct 9, 2018

Was this helpful?

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