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
This one liner actually solved everything:
PRAGMA SERIALLY_REUSABLE;
Be sure that your global variables are stateless to avoid any issues.