Symptom
You receive an application error when conducting a basic import.
The application error id is accompanied by the error:
- unique constraint violated: Table(USER_ACCOUNT), Index(UC_USER_ACCOUNT_PERSON_ID)
- Failed to add/update user [xxxxx] "XXXXX" - DAOException caught: SQLException thrown unique constraint violated" appears in the email notification after an Employee Import Scheduled job completes.
- Exception caught error is received when importing a user.
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
SAP SuccessFactors HXM Suite
Reproducing the Issue
- Navigate to Employee Import or Basic Employee Import (for Employee Central enabled Instances) to update or Import a user.
- Select the file to be imported.
- Validate the file - there are no errors generated.
- Select the file to be imported and select Import.
- SQLException Error Message is received.
Example:
- XXXXX - DAOException caught: com.sap.db.jdbc.exceptions.SQLIntegrityConstraintViolationExceptionSapDB:
- [XX]: unique constraint violated: Table(USER_ACCOUNT), Index(UC_USER_ACCOUNT_PERSON_ID)
Cause
There is a dirty data on the database which needs to be cleaned up. The Username in the user data file and on the database is inconsistent.
Resolution
The Import Engineering team needs to run a Script to solve your issue,
Customer Action:
- Please contact Employee Central Support Team (Component: LOD-SF-EC-EDP) and Add the following to your Incident:
- Instance ID
- Customer Approval for the script to be ran at the database level to fix the dirty data( No negative impact )
See Also
- 2574481 - Basic Import Options
- 3396997 - 3396997 - [H2 2023] User Account management check tool enhancement
- 3051283 - H1 2021 - Employee Import Email Notification Changes
- 2449342 - Troubleshooting Employee Import issues - Guided Answer
- 2089382 - User Import Errors - Duplicate Username or Username has already been taken by a soft purged user - Platform
- 2138823 - User Data File (UDF) or Employee Import: General Error Codes - PLT
Keywords
basic import, SQLException thrown: unique constraint violated, DAOException caught, employee import,ORA-00001,Exception caught when saving user,Exception caught:, unique constraint violated: Table(USER_ACCOUNT), Index(UC_USER_ACCOUNT_PERSON_ID), DAOException caught: com.sap.db.jdbc.exceptions.SQLIntegrityConstraintViolationExceptionSapDB , KBA , LOD-SF-PLT-UIM , Employee Import Issues , LOD-SF-EC-EDP , Import Employee Data (EC Core only) , Problem