Project import fails with Missing userKey from ApplicationUser id
Platform Notice: Data Center Only - This article only applies to Atlassian apps 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
When attempting project import, you see the following error on the UI :

The following appears in the atlassian-jira.log:
2014-07-25 17:11:57,254 JiraTaskExectionThread-8 WARN anikolaev 1031x15937x1 1pto3n 10.250.147.170 /secure/admin/ProjectImportSelectProject.jspa [imports.project.handler.ChainedSaxHandler] Encountered a parsing exception.
com.atlassian.jira.exception.ParseException: Missing userKey from ApplicationUser id = 10000
at com.atlassian.jira.imports.project.handler.RegisterUserMapperHandler.handleApplicationUser(RegisterUserMapperHandler.java:66)
at com.atlassian.jira.imports.project.handler.RegisterUserMapperHandler.handleEntity(RegisterUserMapperHandler.java:203)
at com.atlassian.jira.imports.project.handler.ChainedSaxHandler.endTopLevelElement(ChainedSaxHandler.java:250)
at com.atlassian.jira.imports.project.handler.ChainedSaxHandler.endElement(ChainedSaxHandler.java:195)
at com.atlassian.jira.imports.project.handler.ChainedSaxHandler.endElement(ChainedSaxHandler.java:150)
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)Diagnosis
Look into the data in the app_user table. There should be an empty row with the ID mentioned in the error message.
Use a database query as follows (don't forget to replace <ID_from_error> with the appropriate ID) to confirm.
Select * from app_user where id = <ID_from_error>Cause
We are not sure about the cause of this. A direct database update can cause this.
Solution
Resolution
Warning: Backup your database before proceeding.
Before running any SQL in this article, create a full backup of your Jira database. This is a database-level operation with no undo other than restoring from backup. Only proceed if you're comfortable running SQL directly against the Jira database, and test on a staging or cloned environment first, wherever possible.
Stop JIRA
Run this query in the database :
delete from app_user where id = <ID_from_error>;ℹ️ Replace <ID_from_error> with the id from the error message above.
Restart JIRA
Export the xml backup from JIRA.
Re-attempt the project import.
Was this helpful?