Support Article

Copy/Merge RuleSet produces error



When attempting to open the Copy/Merge Ruleset Wizard from Designer Studio > System > Refactor > Rulsesets, an error is thrown: "pyCommitError:** ** Batch entry 0 WITH source as..."

Error Messages

Exception leads to
SQLState 23505, Error code 0: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "pc_work_accel_pk"
Detail: Key (pzinskey)=(PEGAACCEL PXW-3) already exists.

Steps to Reproduce

  1. Go to Designer Studio > System > Refactor > RuleSet.
  2. Click on Copy or Merge RuleSet.

Root Cause

A defect or configuration issue in the operating environment:

Column pylastreservedid value for 'pxW-' record in pc_data_uniqueid table is out of sync and hence when a new record is getting inserted into the pc_work_accel table the duplicate key value error is getting thrown

Two DB queries used to identify the root cause are:
  • select pyprefix, pylastreservedid from pc_data_uniqueid;
  • select pzinskey from pc_work_accel;

The column pylastreservedid value for  'pxW-' is 5, where as total number of rows in pc_work_accel are 30. Need to update the value for this record to 31.


Perform the following local-change steps:

1. Update the pylastreservedid value of row 'pxW-' of table pc_data_uniqueid to 31.
2. Re-test the application


Published October 5, 2016 - Updated October 18, 2016

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.