Skip to main content
Question

ORA-04068: existing state of packages has been discarded


Dear experts,

I've created an application server task to send a quick report via e-mail.

But I get the following error message in “Application Message”:

ORA-04068: existing state of packages has been discarded 
Caused by: ifs.fnd.base.SystemException: Failed executing statement (ORA-04068: existing state of packages has been discarded
ORA-04061: existing state of package body "IFSAPP.APP_MESSAGE_PROCESSING_API" has been invalidated
ORA-04065: not executed, altered or dropped package body "IFSAPP.APP_MESSAGE_PROCESSING_API"
ORA-06508: PL/SQL: could not find program unit being called: "IFSAPP.APP_MESSAGE_PROCESSING_API"
ORA-06512: at line 1) 
Caused by: java.sql.SQLException: ORA-04068: existing state of packages has been discarded
ORA-04061: existing state of package body "IFSAPP.APP_MESSAGE_PROCESSING_API" has been invalidated
ORA-04065: not executed, altered or dropped package body "IFSAPP.APP_MESSAGE_PROCESSING_API"
ORA-06508: PL/SQL: could not find program unit being called: "IFSAPP.APP_MESSAGE_PROCESSING_API"
ORA-06512: at line 1
 
Caused by: oracle.jdbc.OracleDatabaseException: ORA-04068: existing state of packages has been discarded
ORA-04061: existing state of package body "IFSAPP.APP_MESSAGE_PROCESSING_API" has been invalidated
ORA-04065: not executed, altered or dropped package body "IFSAPP.APP_MESSAGE_PROCESSING_API"
ORA-06508: PL/SQL: could not find program unit being called: "IFSAPP.APP_MESSAGE_PROCESSING_API"
ORA-06512: at line 1

 

 

So I’ve checed the API APP_MESSAGE_PROCESSING_API on our environment and it isn’t available.

How can that happen?

7 replies

Userlevel 3
Badge +10

Did you goto Solution Manager>System Information and Utilities>Oracle Objects>Compile Invalid Objects?  Do you see any?  Can you recompile them?

Userlevel 7
Badge +22

Dear @mwilson 

there were some views and packages which I have recompiled.

But the API I’ve been mentioned isn’t there.

 

Userlevel 3
Badge +10

Have you tried it again since recompiling?  The first time a session encounters an invalid object, oracle will throw an error and recompile the object.  I have also noticed that if the IFS database session was created before the recompile it does not always see the new version, forcing you to logout and log back in.

Userlevel 3
Badge +10

Worst case you might have to restart the integration server.

Userlevel 7
Badge +22

Hi @mwilson 

Why doesn't the PL/SQL developer show me these invalid components?

Userlevel 7
Badge +22

Dear @mwilson 

I’ve recompiled all components and it seems to work for now.

Maybe the error message will appear again because the API APP_MESSAGE_PROCESSING_API isn’t available.

Let me monitor it for a few days. 😊

Userlevel 3
Badge +10

PL/SQL Developer will show you invalids, when they are actually invalid.  It is active sessions that if they already have a reference to the object that was invalid that do not always recognize the change.  You could also try flushing the shared pool.  That will remove alot of old references.  It may also clear alot of caches.

Reply