Skip to content

Databases ​

Adding a JDBC driver ​

Dirigible bundles only the drivers it tests: H2 and PostgreSQL. The dialects of the other databases (SQL generation, DDL, type mapping) ship with the platform, their JDBC drivers do not. Add the driver of the database you connect to in one of three ways:

WayForExample
/modules drop-inthe default and system databases, any imageCOPY mysql-connector-j-9.7.0.jar /modules/ in a downstream image, or mount a volume at /modules. The runtime image launches with -Dloader.path=/modules; set LOADER_PATH (comma-separated) for another location.
Application poma custom edition built from the Dirigible modulesadd the driver dependency next to dirigible-application; the version is managed by dirigible-dependencies.
project.json, scope: "platform"named data sources (*.datasource) declared by a project{ "type": "maven", "id": "com.mysql:mysql-connector-j:9.7.0", "scope": "platform" }, see Maven dependencies.

The default and system databases connect at boot, before any project dependency is resolved, so their driver must be on the launch classpath: use the drop-in or the application pom.

DatabaseDriver classMaven coordinate
Microsoft SQL Servercom.microsoft.sqlserver.jdbc.SQLServerDrivercom.microsoft.sqlserver:mssql-jdbc
SAP HANAcom.sap.db.jdbc.Drivercom.sap.cloud.db.jdbc:ngdbc
MySQLcom.mysql.cj.jdbc.Drivercom.mysql:mysql-connector-j
MariaDBorg.mariadb.jdbc.Driverorg.mariadb.jdbc:mariadb-java-client

A data source whose driver class is not on the classpath fails with a message naming the driver class, the data source and the coordinate to add.

Released under the EPL-2.0 License.