Is it possible to enable leak detection in version 2.3.9? As I previously said in this question Hibernate was using version 2.3.3 of HikariCP. As of February 2016, they have upgraded the version of HikariCP, but unfortunately to version 2.3.9
I need to enable the detection of leaks in order to fix them. I have added the following lines to hibernate configuration file:
<property name="hibernate.hikari.maximumPoolSize">30</property>
<property name="hibernate.hikari.idleTimeout">30000</property>
<property name="hibernate.hikari.dataSource.leakDetectionThreshold">30000</property>
The first two lines work and can be seen in the debug log, but when I add the third one I can't run the application. I have also tried to add this using code, but it still doesn't work. I get the following error:
HHH000130: Instantiating explicit connection provider: org.hibernate.hikaricp.internal.HikariCPConnectionProvider
Initial SessionFactory creation failed.org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]Initial SessionFactory creation failed.Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
leakDetectionThreshold is not property of data source, it is hikaricp specific. try removing word 'dataSource' as:
<property name="hibernate.hikari.leakDetectionThreshold">30000</property>