Existing state of packages has been discarded...? [message #226458] |
Fri, 23 March 2007 17:14  |
henckel
Messages: 9 Registered: March 2006
|
Junior Member |
|
|
We're experiencing a strange problem with PL/SQL package compilation and the execution of a certain procedure of this package.
Software environment:
- Oracle 9i
- BEA WebLogic 8.1 SP5
- Java web front-end
- database handling with EJB 2.1
Action to cause the error:
- Compile a certain package -> without any errors/warning
- Execute the functionality using the web front-end -> error (does not work)
- Execute the functionality using the web front-end (again) -> works fine
The error we get when executing the functionality the first time is:
ORA-04068: existing state of packages has been discarded
We believe that this might have something to do with the connection between the WebLogic application server and the database. Restarting the WebLogic after having compiled successfully will probably solve the problem, but this is not really satisfying.
Is there any other way to get rid of this error? Maybe any chance to refresh the connection automatically?
Thanks a lot for your help!
Best regards
Sven
[Updated on: Fri, 23 March 2007 17:17] Report message to a moderator
|
|
|
|
Re: Existing state of packages has been discarded...? [message #226467 is a reply to message #226460] |
Fri, 23 March 2007 21:28   |
rleishman
Messages: 3728 Registered: October 2005 Location: Melbourne, Australia
|
Senior Member |
|
|
As I think you have discovered, the session that experiences the error has already executed part of that package and has a local copy in memory.
After recompiling in another session, when you go to execute again, it tries its local copy but discovers that its out of date and throws the error.
I've never found anything that helps, but I haven't tried anacedent's suggestion. Looking at the doco, I think that trick might only avoid the invalidation of dependent procs if you recompile without changing the name, parameters, or function return types.
It's never really bothered me before because we always have outages to implement new code.
Ross Leishman
|
|
|
|
|
|