Calling Recompiled Package from JDBC Fails with ORA-04068 Error (Doc ID 301999.1)

Last updated on JULY 07, 2017

Applies to:

JDBC - Version 9.2.0.1 and later
Information in this document applies to any platform.

Symptoms

The JDBC application reports one of the following errors when trying to execute stored procedures:

java.sql.SQLException: ORA-04068: existing state of packages has been discarded

ORA-04061: existing state of package body "xxxxx.xxxxxx" has been invalidated

ORA-04065: not executed, altered or dropped package body "xxxxx.xxxxxx"

ORA-06508: PL/SQL: could not find program unit being called

ORA-06512: at line 1 

 

The JDBC connections are managed by a connection pool as is typically done in an application server deployed application such as a Web application.

 

Changes

Stored packages such as PL/SQL packages were recently altered on the database the JDBC application is  connecting to.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms