Property leakDetectionThreshold does not exist on target class org.postgresql.ds.PGSimpleDataSource

263 views
Skip to first unread message

Alexandre LM

unread,
Mar 9, 2017, 1:29:40 PM3/9/17
to HikariCP
Hello!

I am trying to use this property but it gives me that exception, I tried even with: pgjdbc-ng | com.impossibl.postgres.jdbc.PGDataSource but without success, it gives me tha same title exception.

..2099 [Thread-0] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
2119 [Thread-0] ERROR com.zaxxer.hikari.util.PropertyElf - Property leakDetectionThreshold  does not exist on target class org.postgresql.ds.PGSimpleDataSource
Mar 09, 2017 3:22:08 PM sintel.onetouch.db.services.GruposService listar
SEVERE: null
java.lang.RuntimeException: Property leakDetectionThreshold  does not exist on target class org.postgresql.ds.PGSimpleDataSource
at com.zaxxer.hikari.util.PropertyElf.setProperty(PropertyElf.java:131)
at com.zaxxer.hikari.util.PropertyElf.lambda$setTargetFromProperties$10(PropertyElf.java:57)
at java.util.Hashtable.forEach(Hashtable.java:878)
at com.zaxxer.hikari.util.PropertyElf.setTargetFromProperties(PropertyElf.java:52)
at com.zaxxer.hikari.pool.PoolBase.initializeDataSource(PoolBase.java:318)
at com.zaxxer.hikari.pool.PoolBase.<init>(PoolBase.java:111)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:106)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:97)
at sintel.onetouch.db.api.ConnectionPool.getConnection(ConnectionPool.java:58)
at sintel.onetouch.db.services.GruposService.listar(GruposService.java:41)
at sintel.onetouch.client.gui.cadastro.operador.DialogPermissaoUsuarios.initGrupos(DialogPermissaoUsuarios.java:805)
at sintel.onetouch.client.gui.cadastro.operador.DialogPermissaoUsuarios.initDados(DialogPermissaoUsuarios.java:792)
at sintel.onetouch.client.gui.cadastro.operador.DialogPermissaoUsuarios.<init>(DialogPermissaoUsuarios.java:52)
at sintel.onetouch.client.gui.cadastro.operador.DialogPermissaoAcesso.initDialogs(DialogPermissaoAcesso.java:1507)
at sintel.onetouch.client.gui.cadastro.operador.DialogPermissaoAcesso.<init>(DialogPermissaoAcesso.java:32)
at sintel.onetouch.client.gui.cadastro.operador.DialogCadastroOperador.<init>(DialogCadastroOperador.java:47)
at sintel.onetouch.client.gui.cadastro.GerenciadorCadastro.<init>(GerenciadorCadastro.java:118)
at sintel.onetouch.client.controle.ControlePrincipal.inicializa(ControlePrincipal.java:232)
at sintel.onetouch.client.controle.ExecutorInicializacao.run(ExecutorInicializacao.java:19)

HirakriCP configuration:

        ds = new HikariDataSource();
        ds.setMaximumPoolSize(poolSize);
        ds.setDataSourceClassName("org.postgresql.ds.PGSimpleDataSource");
        ds.addDataSourceProperty("serverName", serverAddress);
        ds.addDataSourceProperty("databaseName", database);
        ds.addDataSourceProperty("user", user);
        ds.addDataSourceProperty("portNumber", port);
        ds.addDataSourceProperty("password", password);
        ds.addDataSourceProperty("leakDetectionThreshold ", 5000);

//        ds.setDataSourceClassName("com.impossibl.postgres.jdbc.PGDataSource");
//        ds.addDataSourceProperty("host", serverAddress);
//        ds.addDataSourceProperty("database", database);
//        ds.addDataSourceProperty("user", user);
//        ds.addDataSourceProperty("port", port);
//        ds.addDataSourceProperty("password", password);

May I be doing something wrong? I am scared that I couldn't find anyone with the same problem over the internet oO

Than you in advance,
Alexandre

Alexandre LM

unread,
Mar 9, 2017, 1:31:06 PM3/9/17
to HikariCP
I am using this versions:

        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
            <version>2.6.0</version>
            <scope>compile</scope>
        </dependency>

Brett Wooldridge

unread,
Mar 9, 2017, 6:48:07 PM3/9/17
to HikariCP
leakDetectionThreshold is not a driver property. Call ds.setLeakDetectionThreshold(...).

Alexandre LM

unread,
Mar 10, 2017, 7:33:31 AM3/10/17
to HikariCP
You are correct, thank you very much!
Reply all
Reply to author
Forward
0 new messages