Oracle Applications Adapter and ORA-04061: existing state of package has been invalidated
We get the ORA-04061 error from time to time after a code change in our development environment. It causes our composites to fail. I have been asked to investigate this error to determine if it will cause problems for us in PROD.
Based on reading various articles (including http://oraclequirks.blogspot.com/2007/03/ora-04061-existing-state-of-package-has.html) it seems that there is a danger of this error occurring after we run a database patch that changes the PLSQL packages called through SOA. Our DBA’s tell me that forcing restarts of servers after patching is impractical.
To resolve the error all that is needed is that the PLSQL needs to be called again. I could put exception handlers into BPELs that try every PLSQL twice but that is a massive change to a lot of code and could introduce other problems. Is there an option for the Oracle Applications adapter to detect this error and retry?
Alternatively can we add some code to the database patch which would force WebLogic to close all active connections once the patch is applied?
Any advice would be appreciated