this is linked to the pool validations, not your business code I think
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://blog-rmannibucau.rhcloud.com> | Old Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory <https://javaeefactory-rmannibucau.rhcloud.com> 2017-01-19 18:19 GMT+01:00 KARR, DAVID <[email protected]>: > > -----Original Message----- > > From: KARR, DAVID > > Sent: Wednesday, January 18, 2017 5:02 PM > > To: [email protected] > > Subject: How do deal with occasional "Failed to validate a newly > > established connection." > > > > I've got a small app running in Tomee. It runs a couple of Oracle db > > queries every two minutes. I'm getting errors like this every once in a > > while: > > --------------- > > Caused by: java.sql.SQLException: Failed to validate a newly established > > connection. > > Some other aspects of this are: > > I'm using the same DAO class to run two different queries. I've run the > app in the debugger and directly tested the queries in my SQL browser. > Both queries are fine. In fact, when the app starts up, I get valid > results from both queries for a few minutes. Then, the second query of the > two simply starts failing with this error every time. The first query > never has a problem. Both queries are similar, simply returning a > different set of columns and aggregates on the same table. > > When I restart the tome instance, the cycle starts over again. > >
