Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-57575

Importing from Cloud site to Server fails with error related to duplicated users

    XMLWordPrintable

Details

    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

          Activity

            People

              03cb0c04aa4f Irina Tiapchenko
              rbattaglin Renan Battaglin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: