Details
-
Bug
-
Resolution: Fixed
-
Low
-
6.11.2
-
7
-
Severity 2 - Major
-
Description
Similar to CONFCLOUD-52148, however it needs to be fixed in Server as well.
Symptoms
When attempting to restore a site XML backup to Confluence, it fails with the following error in atlassian-confluence.log:
2014-01-20 19:59:33,583 ERROR [Long running task: Importing data] [confluence.importexport.xmlimport.BackupImporter] importEntities Cannot import the entities: -- referer: http://localhost:8090/setup/setup-restore-start.action | url: /setup/setup-restore-local.action | userName: admin | action: setup-restore-local com.atlassian.confluence.importexport.ImportExportException: Unable to complete import because the data does not match the constraints in the Confluence schema. Cause: SQLException: Violation of UNIQUE KEY constraint 'unq_lwr_username'. Cannot insert duplicate key in object 'dbo.user_mapping'. The duplicate key value is (user1). at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:72) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:387) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:355) at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:119) at com.atlassian.confluence.importexport.xmlimport.BackupImporter$1.doInTransactionWithoutResult(BackupImporter.java:193)
The XML backup contains a duplicate record that the import is trying to insert into the user_mapping table for uniq_lwr_username = user1 (for the example above).
Workaround
See the KB article:
https://confluence.atlassian.com/confkb/confluence-site-xml-import-fails-with-duplicate-key-error-438993638.html
Attachments
Issue Links
- causes
-
CONFCLOUD-52148 Confluence site import failing with error related to duplicated users
- Closed
- is duplicated by
-
CONFSERVER-60542 Cloud to Server Space import is checking username instead of lower username
- Closed
- links to