Oracle Solution for Error ora-31224

Solution for Oracle Error ORA-31224

ORA-31224: DBMS_LDAP: invalid LDAP session

What triggered the Error:

An attempt was made by a PL/SQL module to use an LDAP session which is not valid and might have already been closed.

What should we do to fix it:

Check the LDAP session handle in PL/SQL module involving DBMS_LDAP.