All Oracle Error CodesOracle DBA Forum

OCI-21522:

attempted to use an invalid connection in OCI (object mode only)
Cause: User attempted to use an invalid connection or a connection that has been terminated in an OCI environment (object mode), or user attempted to dereference a REF obtained from a connection which has been terminated.
Action: Ensure that the connection exists and is still valid.