Search code examples
javaconnection-poolinginformixhikaricp

Hikari - Driver does not support get/set network timeout for connections. (Method not supported : IfxSqliConnect.getNetworkTimeout())


Connecting to an Informix Database through Hikari in Java 8 to create a connection pool I run into the following error message:

10:22:44.180 [main] INFO com.zaxxer.hikari.pool.PoolBase - HikariPool-1 - Driver does not support get/set network timeout for connections. (Method not supported : IfxSqliConnect.getNetworkTimeout())

These are the Maven Dependencies:

<dependency>
    <groupId>com.ibm.informix</groupId>
    <artifactId>jdbc</artifactId>
    <version>4.10.8.1</version>
</dependency>
<dependency>
    <groupId>com.zaxxer</groupId>
    <artifactId>HikariCP</artifactId>
    <version>3.4.5</version>
</dependency>

This is the function used to Configurate the Data Source:

private static HikariDataSource ConfigurarDataSource() {
    HikariConfig configuracio = new HikariConfig();
    configuracio.setJdbcUrl(propietats.get("jdbc.url"));
    configuracio.setUsername(propietats.get("jdbc.username"));
    configuracio.setPassword(propietats.get("jdbc.password"));
    configuracio.setDriverClassName(propietats.get("jdbc.driver"));
    configuracio.setMaximumPoolSize(10);
    configuracio.setMinimumIdle(5);
    configuracio.setConnectionTimeout(30000); /* 30 segons */
    configuracio.setIdleTimeout(150000); /* 2.5 minuts */
    configuracio.setMaxLifetime(300000); /* 5 minuts */
    return new HikariDataSource(configuracio);
}

While not outright affecting the connection, not in any meaningful and perceptible manner at least, I am still concerned about the error.

Does it affect performance? Please help me understand what is the meaning of the error and how can I solve it 🥺.


Solution

  • Update your Informix JDBC driver to the latest supported version for Java 8

    <dependency>
          <groupId>com.ibm.informix</groupId>
          <artifactId>jdbc</artifactId>
          <version>4.50.10.1</version>
    </dependency>
    

    Let me know if worked for you 😉