Data import fails due to duplicate entries in either the authors or logininfos xml files

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.

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

Problem

When trying to import data into an instance from a backup file an error is displayed in the Bamboo web user interface stating the import has failed and that the instance may be corrupted.

An error message similar to the following appears in the <BambooHome>/logs/atlassian-bamboo.log file:

2015-05-15 16:06:11,225 ERROR [http-bio-10571-exec-20] [SetupImportDataAction] Failed to import
java.lang.Exception: Import has failed. Errors encountered while importing. This Bamboo instance may be corrupt.
	at com.atlassian.bamboo.migration.ImportExportManagerImpl.bambooImport(ImportExportManagerImpl.java:216)
[...]
Caused by: java.sql.BatchUpdateException: Duplicate entry 'test user <test.user@test.net>' for key 'AUTHOR_NAME'
	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1815)
[...]

Cause

There are two possible causes of this problem.

  1. Duplication in the import files
    Typically this affects the authors.xml file or the logininfo.xml file. Bamboo expects names, usernames and e-mail addresses in the authors.xml file to be unique (taking case-sensitivity into account, i.e. jdoe@atlassian.com is different from JDOE@atlassian.com), so if the import file contains duplicate information, the import will fail.

  2. The database of the instance that you are trying to import into is set to be case insensitive
     As a result the database considers the e-mail addresses jdoe@atlassian.com and JDOE@atlassian.com to be identical and the import fails.

Resolution

In order to resolve this problem you will first need to identify whether there's duplication in the import files or whether your database is correctly set to be case sensitive. Follow these steps:

  1. Use your database vendor tools to check if the database holding your Bamboo data is configured to be case sensitive. 
    If it is set to be case insensitive, change it to be case sensitive.

  2. If your database was previously set to be case insensitive, attempt the import again. If it still fails in the same way, continue with step 3 below

  3. Inspect the authors.xml and/or logininfos.xml files and ensure every username, name, and e-mail address in these files is unique. 
    Note: John Doe and John doe, and jdoe and jDoe, and jdoe@atlassian.com and JDOE@atlassian.com are considered unique because they use different casing). 
    Make the necessary corrections to ensure uniqueness of each username, name, and e-mail address and save the file.

  4. Zip up all XML files and attempt the import again

   

 

Last modified on May 27, 2016

Was this helpful?

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