Resolve Error ORA-04068: existing state of packages has been discarded
If you receive a java.sql.SQLException: ORA-04068: existing state of packages has been discarded
error, then perform the following tasks.
- Ensure that the stored procedure is stateless.
- Avoid using global variables.