Error "Unique Constraint (**) Violated. The Value ** of The Field ** Already Exist" in a Synchronization When Trying to Update XML File to P6

(Doc ID 2288875.1)

Last updated on JULY 27, 2017

Applies to:

Primavera Gateway - Version to 17.7 [Release 16.2 to 17.7]
Information in this document applies to any platform.


On Gateway when attempting to created a synchronization to import Resource and Role data from XML to P6, it was observed that the synchronization is successful the first time and the Resources and Roles are created correctly.
However it fails when trying to make updates and import the file again (to update Resources) the sync fails with errors saying the Resource and Role IDs already exist.

ID: Unique constraint (ParentObjectId,ID) violated. The value GW01 of the field ID already exists.
Name: Unique constraint (ParentObjectId,Name) violated. The value Gateway 01 of the field Name already exists.


  1. Create a synchronization in gateway to import Resource and Role data from XML to P6. The sync is successful the first time to create the Resources and Roles
  2. Restart the synchronization and try to make updates. The error in the logs state the Role and Resource IDs already exist in P6 which is correct, but the expected behavior should be that the sync should see this and make updates where applicable.

    For example changing Resource to Inactive. This sync does have some custom mappings for IsActive standard field and Resource Code Assignments

  3. Notice the error


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms