Creating New Asset Using AssetAPI Fails, Unique Constraint Violated (Doc ID 1571014.1)

Last updated on NOVEMBER 03, 2016

Applies to:

Oracle WebCenter Sites - Version 7.6.0 to 7.6.2 [Release FatWire]
Information in this document applies to any platform.

Symptoms

We create assets in a standalone application using Asset API. Occasionally this fails due to a constraint conflict (e.g. on AssetPublication table), when CS allocates an ID to the asset which has already been allocated before to a different asset.

For example

Exception executing prepared statement: INSERT INTO AssetPublication (ID,PUBID,ASSETTYPE,ASSETID) VALUES (?,?,?,?)
ID = 1279340055967
PUBID = 1265114392131
ASSETTYPE = MyAssetType
ASSETID = 1372194999713
java.sql.SQLException: ORA-00001: unique constraint (CUST_FWE.I1277985477639) violated

fails because there already exists an asset on this publication with a different assettype but the same assetid 1372194999713

Cause

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