Cause
Before returning an autonomous PL/SQL block, all autonomous transactions that were started within the block must be completed, either committed or rolled back. If not, then the active autonomous transaction is implicitly rolled back and this error is raised.
Action
Ensure that before returning an autonomous PL/SQL block, any active autonomous transactions are explicitly committed or rolled back.