Cloning a category in the web interface causes Unique Constraint Violation error.

Cloning a category in the web interface causes Unique Constraint Violation error.

book

Article ID: KB0081281

calendar_today

Updated On:

Products Versions
TIBCO XML Canon -
Not Applicable -

Description

Cloning a tagged Category causes the following error:
java.lang.RuntimeException:  
com.tibco.xmlcanon.jdbc.base.BaseBatchUpdateException: [Tibco][Oracle JDBC Driver][Oracle]ORA-00001: unique constraint
(XMLCANON.ESS_GROUP_CATEGORY_PERM_PK) violated
at com.tibco.c.a.f.a(Unknown Source)
    at com.extensibility.ess.datastore.v.b.a(Unknown Source)
    at com.extensibility.ess.datastore.r.c.a(Unknown Source)
    at com.extensibility.ess.manager.CategoryController.cloneCategory
    ... etc
The error stems from creating duplicate rows in the ESS_GROUP_CATEGORY_PERMISSIONS table in the database. However, we only do so for categories which have permissions other than “Default”.
 

Resolution

The permissions on categories must be reset to “Default” from the Web UI, and depending on the setup of your category permissions, the solution may follow one of two scenarios:

First Scenario: If all of your categories share the same permissions for all child categories, the solution could be accomplished by following these steps:
1. Select the category you wish to clone
2. Verify the child categories share the same permissions.
3. Write down the permissions used.
4. Change all the permissions to “Default” and select “Update permissions recursively”.
5. Clone the category.
6. Change the permissions back on both the original and clone.

Second Scenario: If your categories exhibit different permissions for all child categories, the solution would be accomplished following the same instruction above EXCEPT for one additional step:
7. You must go through all categories and record their permission in order to reset them after the cloning is completed.

Issue/Introduction

Cloning a category in the web interface causes Unique Constraint Violation error.