Merging workspace with open transactions hangs over JDBC
616281Jan 7 2008 — edited Jan 7 2008Hi,
I am using Oracle's ojdbc14.jar JDBC library (Oracle JDBC Driver version - "10.2.0.1.0") to connect to a 10g2 database, to write a java wrapper for the Oracle Workspace Manager PL-SQL API. Creation and removal of workspaces works fine using my java wrapper. However, merge has problems when there are open (uncommitted) transactions in the workspace you are trying to merge. If I attempt the merge using the PL-SQL directly in a SQL client, like this (numbers indicate the sequence of calls):
1. execute dbms_wm.CREATEWORKSPACE('MergeWithOpenTxns');
2. execute dbms_wm.GOTOWORKSPACE('MergeWithOpenTxns');
3. {run some update SQL in the new workspace but don't commit it}
4. execute dbms_wm.MERGEWORKSPACE('MergeWithOpenTxns');
I get this error:
Error starting at line 1 in command:
execute dbms_wm.MERGEWORKSPACE('MergeWithOpenTxns');
Error report:
ORA-20233: deadlock detected when trying to acquire lock for workspace: MergeWithOpenTxns, session may have open database transactions
ORA-06512: at "SYS.LT", line 5945
ORA-06512: at line 1
However, if I run the same call via JDBC using a CallableStatement, it just hangs there indefinitely. Note that this does not happen in the different scenario when there are merge conflicts between the parent and child workspace: in that case, the java wrapper behaves the same as the PL-SQL API called via a SQL client.
Has anyone seen this problem before, or have any ideas that could help me resolve it?
Many thanks.