Getting this error when attempting to import XML Backup into Microsoft SQL Server:
Error importing data: org.xml.sax.SAXException: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:ApplicationUser][lowerUserName,fpereyra ][id,15504][userKey,ID15504] (SQL Exception while executing the following:INSERT INTO jiraschema.app_user (ID, user_key, lower_user_name) VALUES (?, ?, ?) (Cannot insert duplicate key row in object 'jiraschema.app_user' with unique index 'uk_lower_user_name'. The duplicate key value is (fpereyra ).)) java.lang.Exception: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:ApplicationUser][lowerUserName,fpereyra ][id,15504][userKey,ID15504] (SQL Exception while executing the following:INSERT INTO jiraschema.app_user (ID, user_key, lower_user_name) VALUES (?, ?, ?) (Cannot insert duplicate key row in object 'jiraschema.app_user' with unique index 'uk_lower_user_name'. The duplicate key value is (fpereyra ).))
I'm attempting to migrate from a single Jira Server to a new set of load-balanced servers, but this is stopping that effort dead.
In case this will benefit anyone, solution ended up being finding the duplicate in the DB and then updating it to be unique. SQL commands used below:
select * from app_user where lower_user_name like 'fperey%';
select * from cwd_user cw join app_user au on cw.lower_user_name = au.lower_user_name where au.lower_user_name like 'fperey%';
update app_user set lower_user_name = 'fpereyra2' where id = 15504;
commit;
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.