Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Error (-4068)--(ORA-04068: existing state of packages has been discarded

Re: Error (-4068)--(ORA-04068: existing state of packages has been discarded

From: Frank Hubeny <fhubeny_at_ntsource.com>
Date: Wed, 11 Oct 2000 01:28:31 -0500
Message-ID: <39E4088F.8A9E86AD@ntsource.com>

I have noticed this error in development environments on 8i. In this environment it is usually caused by someone compiling a package that other packages depend on. The application that depends on these packages gets the error. One would expect the application's call of the dependent packages should force the dependent packages to be revalidated, but this does not always occur.

The workaround that I have been using is to run test scripts against the set of packages when a top level package is recompiled. In general any sort of script that exercises the invalidated packages should force the dependent packages to be recompiled.

Frank Hubeny

Jeff Kish wrote:

> Greetings.
>
> One of my users is getting this (I have replaced the actual package
> with the string 'NAMEOFPACKAGE', and the name of the database with
> 'THEDB'):
>
> Error (-4068)--(ORA-04068: existing state of packages has been
> discarded
> ORA-04061: existing state of package body "THEDB.NAMEOFPACKAGE" has
> been invalidated
> ORA-04065: not executed, altered or dropped package body
> "THEDB.NAMEOFPACKAGE"
> ORA-06508: PL/SQL: could not find program unit being called
>
> Can someone recommend the best way for me to trouble shoot this and
> figure out what the cause of the problem is? They tried running it
> several times, (the application that makes the call into the package)
> but the error keeps reoccurring. I thought that trying it again would
> reinitialize the situation. I am not really sure why the situation
> develops in the first place.. I mean, if noone is recompiling the
> package, why would it ever get into a weird state?
>
> Sorry for my lack of understanding in these matters!
>
> Thanks
> Jeff Kish
Received on Wed Oct 11 2000 - 01:28:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US