My Oracle Support Banner

WebLogic Portal (WLP) "SQLException: ORA-00001: Unique Constraint (DB.PK) Violated" when Adding Items in Database (Doc ID 1061448.1)

Last updated on SEPTEMBER 30, 2022

Applies to:

Oracle WebLogic Portal - Version 8.1 and later
Information in this document applies to any platform.

Purpose

Note:  This article does not address the following unique constraint violations.  These are separate unique constraint violation issues.  Please see their related articles.

unique constraint (DB.PK_ENT_POLICY) violated: Document 1061447.1

unique constraint (DB.PK_LEASE) violated: Document 976100.1

There are times when the following exception is thrown when an item is being added to the Database (DB).  The items being added to the DB are being added by the internal WebLogic Portal (WLP) Framework, not by the application.  Some examples of items that get added to the DB are Content Management (CM) Nodes, Property Values, Portlets, Books, Pages and Themes.  When this exception is thrown, the DB is unable to add the item.  This article describes the cause of the issue and how to resolve it. 

The format of the exception is as follows:

Troubleshooting Steps

To view full details, sign in with your My Oracle Support account.

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


In this Document
Purpose
Troubleshooting Steps
 What causes the "java.sql.SQLException: ORA-00001: unique constraint (DB.PK) violated" issue? 
 Content Management Example (CM_NODE, NODE_ID, SEQUENCER, SEQUENCE_NAME, NODE_ID_SEQUENCE)
 How does a Primary Key value get out of sync?
 How to resolve the unique constraint violation
 
 Sample SEQUENCER Table
 Sample CM_NODE Table
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.