I’m trying to create a Hikari DataSource with the Denodo driver:
@Bean
DataSource dataSourceDenodo() throws ClassNotFoundException {
HikariDataSource dataSource = new HikariDataSource();
dataSource.setDriverClassName("com.denodo.vdp.jdbc.Driver");
dataSource.setJdbcUrl(env.getProperty("denodo.jdbcUrl"));
dataSource.setUsername(env.getProperty("denodo.userName"));
dataSource.setPassword(env.getProperty("denodo.password"));
dataSource.setMaximumPoolSize(30);
dataSource.setPoolName("denodo");
return dataSource;
}
I have the denodo-driver.jar file in my project. For some reason, I’m getting the following message:
com.zaxxer.hikari.util.DriverDataSource - Registered driver with driverClassName=com.denodo.vdp.jdbc.Driver was not found, trying direct instantiation.
com.zaxxer.hikari.pool.PoolBase - denodo - Driver does not support get/set network timeout for connections. (null)
com.zaxxer.hikari.pool.HikariPool - denodo - Added connection com.denodo.vdb.jdbcdriver.VDBJDBCConnection@4cad7e97
I’m trying to understand this because when I’m trying to query Denodo, it only works for the first call. If I try to call it a second time with the same query, I get:
Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLTransientConnectionException: denodo - Connection is not available, request timed out after 30241ms.
I tried to put Class.forName("com.denodo.vdp.jdbc.Driver");
in the method, but this didn’t help.
I tried different driver versions from Denodo website.