Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Error importing XML backup to Microsoft SQL Server

Michael Johnston November 10, 2021 edited

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.

1 answer

1 accepted

0 votes
Answer accepted
Michael Johnston November 22, 2021

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;

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira service management, jsm webinar, ai in jsm, opsgenie integration, incident management, virtual agent, atlassian intelligence, ai-powered service desk, it operations, atlassian learning, service management webinar, team '25 recap

What’s new in Jira Service Management 🤔

Discover how Atlassian is revolutionizing service management with cutting-edge solutions for AI-powered support, HR Service Management, or DevOps connectivity.

Register here ⬇️
AUG Leaders

Atlassian Community Events