Skip to content

Commit 3a1fe51

Browse files
committed
Update OracleDatabaseImpl.java
1 parent 7a74f78 commit 3a1fe51

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/oracle/soda/rdbms/impl/OracleDatabaseImpl.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,20 @@ private void callDropPLSQL(String collectionName) throws OracleException
968968
{
969969
if (OracleLog.isLoggingEnabled())
970970
log.severe(e.toString());
971+
972+
// ### Temporary workaround for the cryptic
973+
// "ORA-00054: resource busy and acquire with NOWAIT specified or timeout
974+
// expired" exception. This exception occurs when a collection with
975+
// uncommitted writes is attempted to be dropped. We wrap ORA-00054
976+
// in an OracleException with a message telling the user to commit.
977+
// DBMS_SODA_ADMIN will eventually be modified to output a custom
978+
// exception with the same message, instead of the ORA-00054.
979+
// Then this workaround can be removed.
980+
if (e.getErrorCode() == 54)
981+
throw SODAUtils.makeExceptionWithSQLText(SODAMessage.EX_COMMIT_MIGHT_BE_NEEDED,
982+
e,
983+
sqltext);
984+
971985
throw SODAUtils.makeExceptionWithSQLText(e, sqltext);
972986
}
973987
finally

0 commit comments

Comments
 (0)