Oracle Error ORA-24780: cannot recover a transaction while in an existing transaction

Oracle Error Message

ORA-24780: cannot recover a transaction while in an existing transaction

Reason for the Error

An attempt was made to commit or roll back a transaction while in a different transaction, and the transaction for which the action is requested is in a recovery state (this happens if it is idle too long).

Solution

Detach from the current transaction and retry the operation.