1

I use oracle UCP in my java application and call oracle packages. When package is broken and then made valid again, i continue to get ORA-06508: PL/SQL: could not find program unit being called until i restart my java application. I use connection validation with "select 1 from dual". How can i configure my connection pool to drop connection if it receives ORA-06508. Should i handle SQLException and analyze ORA code myself? And also, java.sql.Connection has no method to drop phisical connection in pool. Or maybe there's a better way?

Sashlik
  • 53
  • 5
  • 3
    Potential duplicate of [ORA-06508: PL/SQL: could not find program unit being called](http://stackoverflow.com/q/19376440/5221149) – Andreas Nov 01 '16 at 08:49
  • You haven't said which container you're using; with WebLogic for instance you can reset the connection pool (`java weblogic.admin RESET_POOL`) rather than having to restart the whole server. Perhaps your environment allows the same? This ought to be something you only have to deal with in development or maintenance windows, not in normal running. And removing state from your packages, if that's possible, would avoid it altogether. – Alex Poole Nov 01 '16 at 09:02
  • 1
    Alex, i use spring boot standalone application and have no control on db dev team releases and developement practices. What i would like to do is to reset pool (or preferably single connection in pool) on this specific ORA automatically – Sashlik Nov 01 '16 at 13:13

0 Answers0