It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Duplicate entry '???' for key 'unq_lwr_username'

doushuo I'm New Here Oct 16, 2019
2019-10-16 20:21:33,984 ERROR [Long running task: Importing data] [confluence.importexport.actions.ImportLongRunningTask] runInternal Failure during import
-- url: /longrunningtaskxml.action | referer: | traceId: 205f53eb7420b3eb | userName: admin | action: longrunningtaskxml
com.atlassian.confluence.importexport.ImportExportException: com.atlassian.confluence.importexport.ImportExportException: Unable to complete import because the data does not match the constraints in the Confluence schema. Cause: MySQLIntegrityConstraintViolationException: Duplicate entry '???' for key 'unq_lwr_username'
at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(
at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(
at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(
at com.atlassian.confluence.importexport.xmlimport.BackupImporter$1.doInTransactionWithoutResult(
at com.atlassian.confluence.importexport.xmlimport.RestorePluginStateStoreTransactionCallbackDecorator.doInTransaction(
at com.atlassian.confluence.importexport.xmlimport.RestoreBandanaValuesTransactionCallbackDecorator.doInTransaction(
at com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(
at com.atlassian.confluence.importexport.Importer.doImport(
at com.atlassian.confluence.importexport.DefaultImportExportManager.performImportInternal(
at com.atlassian.confluence.importexport.DefaultImportExportManager.doPerformImport(
at com.atlassian.confluence.importexport.DefaultImportExportManager.performImport(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(


I performed a manual upgrade on version 6.11 to update to version 7.0.2, and then manually backed up the XML files on version 7.0.2.

When I restored the XML backup file on the clean Data Center7.0.2 version, the above error occurred. Before that, I consulted the user_mapping table in mysql, and found that the values of username and lower_username fields were unique. The duplicate fields had been modified before the XML backup.

For help! thank you

1 answer

1 accepted

0 votes
Answer accepted
doushuo I'm New Here Oct 16, 2019

Oh,,,,,,Such a low-level error, I should think is the problem of mysql coding, because there is a question mark in the error message!

(The character_set_server value defaults to Latin characters, which I did not change to utf8.)

MariaDB [(none)]> show variables like 'character%';
| Variable_name | Value |
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | latin |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
8 rows in set (0.00 sec)

MariaDB [(none)]>

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked in Data Center

AMA: How to plan ahead for Data Center - Expert advice from an Atlassian panel

This AMA is now closed Hi! I'm Jacob Shepard a Product Marketing Manager on Atlassian’s Enterprise Team. We know that moving to Data Center is no small task. To do so effectively demands extensive ...

10,361 views 47 36
View question

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you