We\'re getting this error once a day on a script that runs every two hours, but at different times of the day.
ERROR at line 1:
ORA-04068: existing state of
The package has public or private variables. (Right?) This variables form the state a the package. If you compile the package in 3rd session. The next access to this package will throw the ORA-04068.
The build timestamp of a package must be older than the package session state.
If the package state is not needed for script running, the call DBMS_SESSION.RESET_PACKAGE
at the beginning of your script. This cleans all package states of your session.