Oracle Error Message
OCI-21522: attempted to use an invalid connection in OCI (object mode only)
Reason for the Error
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.
Solution
Ensure that the connection exists and is still valid.