SAP Knowledge Base Article - Public

3524981 - Error upon Matrix Relationship change in Position - Employee Central

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

  1. Navigate to Import and Export Data in SAP SuccessFactors Employee Central.
  2. Attempt to import position - matrix relationships.
  3. Encounter the error message "Error occurred. org.hibernate.NonUniqueResultException: query did not return a unique result: 2".
  4. 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

  1. 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. 
  2. Adjust the records in Job Relationships of the user assigned to the affected position to ensure no duplicates exist.
  3. Alternatively, perform a Full Purge Import of Job Relationships of the affected user to correct the issue.
  4. 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

Product

SAP SuccessFactors Employee Central all versions ; SAP SuccessFactors HCM Suite all versions