How to resolve: ORA-04068: existing state of packages has been discarded ORA-04061: existing state of package body “” has been invalidated

  While integration with DB using DB adapter, we often face issues, if DB API at target end is recompiled. An error is received as below:   ORA-04068: existing state of packages has been discarded ORA-04061: existing state of package body “XYZ_PKG” has been invalidated ORA-04065: not executed, altered or dropped package body “XYS_PKG” ORA-06508:…