We have a number of CLOB columns in our application that are edited using CKEditor. To do this we use apex.ajax.clob as described by Carl many moons ago and detailed in this post
When we run the page we sometimes get an error "ORA-00001: unique constraint (APEX_040200.WWV_FLOW_COLLECTIONS_UK) violated". The full error is:
•ora_sqlerrm: ORA-00001: unique constraint (APEX_040200.WWV_FLOW_COLLECTIONS_UK) violated
•component.name: Set CLOB Data
•error_backtrace: ORA-06512: at "APEX_040200.WWV_FLOW_COLLECTION", line 512
ORA-06512: at line 8
ORA-06512: at "SYS.DBMS_SYS_SQL", line 1926
ORA-06512: at "SYS.WWV_DBMS_SQL", line 973
ORA-06512: at "SYS.WWV_DBMS_SQL", line 999
ORA-06512: at "APEX_040200.WWV_FLOW_DYNAMIC_EXEC", line 830
ORA-06512: at "APEX_040200.WWV_FLOW_PROCESS", line 138
Which looks like there is a problem with the collection in the page process called "Set CLOB Data". However, the code for this process is:
v_source CLOB := empty_clob;
WHERE id = :P16_ID;
apex_collection.create_or_truncate_collection(p_collection_name => 'CLOB_CONTENT');
apex_collection.add_member(p_collection_name => 'CLOB_CONTENT',p_clob001 => v_source);
I'm not sure how this code could produce that error?
On our development environment we get the error intermittently and mostly in IE9 although I have had it in Chrome, but never in FireFox. However, on a customer's environment they get this error every time they try to access the page in IE9. Although they don't get it in FF, their company policy is to use IE so it's a big problem for them.
We have only ever had this error since upgrading to APEX 4.2
Does anyone know what could be causing this problem? Or have a workaround? Or is there a different way of handling CLOBs in APEX 4.2 that we could use?
Many thanks for your time.