1

I have an application using SpringData, HikariCP and Oracle 11. When the connection to the DB drops and comes back the application is unable to communicate with the DB unless the application is restarted. I tried adding the following properties as some suggested on similar questions but they did not solve the problem.

spring.datasource.remove-abandoned=true
spring.datasource.testOnBorrow=true
spring.datasource.validationQuery=SELECT 1

Any ideas?

Samantha Catania
  • 5,116
  • 5
  • 39
  • 69

2 Answers2

0

For Oracle i think SELECT 1 isn't the appropriate Query.

Can you try :

SELECT 1 FROM any_existing_table WHERE 1=0
Community
  • 1
  • 1
Rafik BELDI
  • 4,140
  • 4
  • 24
  • 38
  • These properties are NOT for hikaricp. so they are not in effect. Refer HikariCP for the supported properties. – Nitin Apr 05 '16 at 14:53
  • @Nitin You were absolutely right, using the spring boot properties resulted in HikariCP not being configured or used. I changed the config to one of the recommended versions and all was well. Would you like writing an answer? – Samantha Catania Apr 06 '16 at 06:37
  • 1
    @SamanthaCatania Hi, can you please paste / show the config that worked for you ? I am not sure which spring data source properties affect the HikariCP not being configured properly. It would be really helpful. Thanks. – mayur tanna May 20 '19 at 07:10
0

These properties are NOT for hikaricp. so they are not in effect.

Refer HikariCP for the supported properties.

Nitin
  • 1,582
  • 11
  • 12