Data import fails due to duplicate entries in either the authors or logininfos xml files
Platform Notice: Data Center Only - This article only applies to Atlassian products 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
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:
1
2
3
4
5
6
7
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.
Duplication in the import files
Typically this affects the
authors.xml
file or thelogininfo.xml
file. Bamboo expects names, usernames and e-mail addresses in theauthors.xml
file to be unique (taking case-sensitivity into account, i.e.jdoe@atlassian.com
is different fromJDOE@atlassian.com
), so if the import file contains duplicate information, the import will fail.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
andJDOE@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:
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.
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
Inspect the
authors.xml
and/orlogininfos.xml
files and ensure every username, name, and e-mail address in these files is unique.Note:
John Doe
andJohn doe
, andjdoe
andjDoe
, andjdoe@atlassian.com
andJDOE@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.
Zip up all XML files and attempt the import again
Was this helpful?