Skip to content

When using HSQLDB, Hikari logs a warning message about the driver class name when the first connection is retrieved from the pool #23036

@nanlei

Description

@nanlei

WARN message in startup:
[ main] com.zaxxer.hikari.util.DriverDataSource : Registered driver with driverClassName=org.hsqldb.jdbcDriver was not found, trying direct instantiation.

Founds:
HSQLDB registered the JDBC Driver as org.hsqldb.jdbc.JDBCDriver to DriverManager now.

In org.springframework.boot.jdbc.EmbeddedDatabaseConnection, the driver class name is org.hsqldb.jdbcDriver

This maybe the mismatch cause HikariCP cannot get the driver due to below code:

while (drivers.hasMoreElements()) {
            Enumeration<Driver> drivers = DriverManager.getDrivers();
            Driver d = drivers.nextElement();
            if (d.getClass().getName().equals(driverClassName)) { //driverClassName mismatch
               driver = d;
               break;
            }
         }

So we got the WARN message from HikariCP?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions