How to register a new Database driver now JDBCDriver is deprecated

I used to do this through the plugin architecture, adding it via the org.knime.core.JDBCDriver extension point, but this is now reported deprecated. I can’t see what the alternative would be, as the Database Driver Loader appears to be per node, whereas I’m trying to do this as part of an install/setup program.

Is there an alternative extension point, or an established method for replacing this, as I’m worried about future proofing.

Hello,

we have changed the driver loading in order to support different versions of the same driver which is necessary for some databases that do not provide drivers that are backward compatible. The DatabaseUtility (org.knime.core.node.port.database.DatabaseUtility) implementation itseld now uses a DBDriverFactory (org.knime.core.node.port.database.connection.DBDriverFactory) interface. Implementations of it can be found in the extra plugin (org.knime.database.connectors) where each database implements the mentioned interface e.g. org.knime.database.connectors.sqlite.utility.SQLiteDriverFactory. So if you would like to distribute your own driver you would need to write your own DatabaseUtility class and Connector node.

Another option would be to add the path to the new driver jar or directory to the KNIME preferences. This way the driver will be loaded as additional user defined driver and would also take priority over any build in driver in KNIME.

Bye

Tobias

Thanks, I think I’d take the utility route as it has its own installer. Given that it is basically H2, will the default support be enough? We have to make our own connections in nodes so I’m not sure if the driver you have is in the namespace that lets us do that, but obviously if there’s a maintained H2 driver in KNIME, then we don’t have to provide one.