I am running Oracle 8i and have run into a problem. While attempting
to update a row in the database, an exception was thrown (see below).
I caught the exception and attempted to perform a rollback on the
connection (the connection was of type OracleConnection).
Unfortunately, when attempting to perform the rollback on the
exception, *another* exception was thrown - I was not able to perform
the rollback. I need to know what I should do in this situation.
Unfortunately, I do NOT have more information about the exception that
was thrown *during* the rollback - I'm adding debug code there now but
I've been unable to reproduce the problem anyway. So this is a more
GENERAL question. What is the philosophy on dealing with a failed
rollback? The connection is holding on to some locks which is bringing
my application to a standstill - i have to free those locks. I
obviously can't perform a commit.
If it helps, here is the stack for the FIRST exception that was thrown
- the one that forced me to ATTEMPT a rollback - this is NOT the stack
from the actual rollback:
java.lang.NullPointerException
at
oracle.jdbc.driver.T4CNamedTypeAccessor.unmarshalOneRow(T4CNamedTypeAccessor.java:135)
at oracle.jdbc.driver.T4CTTIrxd.unmarshal(T4CTTIrxd.java:785)
at oracle.jdbc.driver.T4CTTIrxd.unmarshal(T4CTTIrxd.java:702)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:527)
at
oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:180)
at
oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:783)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1027)
at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2885)
at
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:2976)
at
oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4103)
I've never seen an exception like this before and I'm guessing it's
very related to why the rollback itself also failed (threw an
exception).
Any light anyone can shed on this problem?
Thanks,
-john