Symptom
- An error occurs when attempting to import position matrix relationships in SAP SuccessFactors Employee Central. The issue is encountered during the import of position relationships, even after file validation is successful.
- The error message displayed is "Error occurred. org.hibernate.NonUniqueResultException: query did not return a unique result: 2".
- The error also occurs while manually changing the matrix relationship of the position on Manage Positions. An application error is displayed.
Environment
SAP SuccessFactors Employee Central
Reproducing the Issue
- Navigate to Import and Export Data in SAP SuccessFactors Employee Central.
- Attempt to import position - matrix relationships.
- Encounter the error message "Error occurred. org.hibernate.NonUniqueResultException: query did not return a unique result: 2".
- The issue is also reproducible while doing the change via Manage Positions. An application error is displayed.
Cause
The error is caused by duplicated (invalid) job relationships for a user assigned to the position being changed. The system is unable to return a unique result due to these duplicated records.
Resolution
- Identify the user with duplicated job relationships. If you are importing multiple positions, the file can be divided in smaller batches until you find the position failing.
- Adjust the records in Job Relationships of the user assigned to the affected position to ensure no duplicates exist.
- Alternatively, perform a Full Purge Import of Job Relationships of the affected user to correct the issue.
- After adjusting the records or performing the Full Purge Import, the position relationship import should work correctly.
See Also
Please refer to the Knowledge Article 0002201658 - Employee Central User Data Full Purge Import for further information.
Keywords
SAP SuccessFactors, Employee Central, Position Import, NonUniqueResultException, Job Relationships, Full Purge Import, Error, 2, query did not return a unique result: 2 , KBA , LOD-SF-EC-POS-IMP , Position Import , LOD-SF-EC-POS , Position Management , LOD-SF-EC-POS-MAT , Matrix Relationships & Job Relationships Sync , Problem