Skip to Main Content

ORA-00001: unique constraint (FLOWS_180100.WWV_FLOW_COLLECTIONS_UK) violated

This error pops up very rarely - so it is almost impossible to debug - when using apex_collection.create_or_truncate_collection.

I tried the solution suggested in https://community.oracle.com/thread/2528757 but that didn't solve anything:
This post suggests that the exception can be safely ignored: https://community.oracle.com/thread/524490
"4. Of the two scenarios Joe showed us, the first one creates the failure condition (assuming two concurrent sessions) by allowing an insert to be performed, i.e., the "create collection" action. Even if the first inserter takes a while to commit, the second one will wait on a lock until the first inserter commits, then it will attempt an insert and raise the UK violation. In the second scenario, nobody ever inserts; only deletes from collections_members$ are issued (assuming the create_collection procedure is never called)."
Code for that would look like this: