{"record":{"id":"d05347c6f89d5847","repo":"quarkusio/quarkus","slug":"unable-to-find-a-jdbc-driver-corresponding-to-the","errorCode":null,"errorMessage":"Unable to find a JDBC driver corresponding to the database kind '%s' for the %s (available: '%s'). Check if it's a typo, otherwise provide a suitable JDBC driver extension, define the driver manually, or disable the JDBC datasource by adding '%s=false' to your configuration if you don't need it.","messagePattern":"Unable to find a JDBC driver corresponding to the database kind '(.+?)' for the (.+?) \\(available: '(.+?)'\\)\\. Check if it's a typo, otherwise provide a suitable JDBC driver extension, define the driver manually, or disable the JDBC datasource by adding '(.+?)=false' to your configuration if you don't need it\\.","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/agroal/deployment/src/main/java/io/quarkus/agroal/deployment/component/DataSourceDefinitionBlockingProcessor.java","lineNumber":260,"sourceCode":"        if (dataSourceJdbcBuildTimeConfig.driver().isPresent()) {\n            return dataSourceJdbcBuildTimeConfig.driver().get();\n        }\n\n        Optional<JdbcDriverBuildItem> matchingJdbcDriver = jdbcDriverBuildItems.stream()\n                .filter(i -> dbKind.equals(i.getDbKind()))\n                .findFirst();\n\n        if (matchingJdbcDriver.isPresent()) {\n            if (io.quarkus.agroal.runtime.TransactionIntegration.XA == dataSourceJdbcBuildTimeConfig.transactions()) {\n                if (matchingJdbcDriver.get().getDriverXAClass().isPresent()) {\n                    return matchingJdbcDriver.get().getDriverXAClass().get();\n                }\n            } else {\n                return matchingJdbcDriver.get().getDriverClass();\n            }\n        }\n\n        throw new ConfigurationException(String.format(\n                \"Unable to find a JDBC driver corresponding to the database kind '%s' for the %s (available: '%s'). \"\n                        + \"Check if it's a typo, otherwise provide a suitable JDBC driver extension, define the driver manually,\"\n                        + \" or disable the JDBC datasource by adding '%s=false' to your configuration if you don't need it.\",\n                dbKind, DataSourceUtil.isDefault(dataSourceName) ? \"default datasource\" : \"datasource '\" + dataSourceName + \"'\",\n                jdbcDriverBuildItems.stream().map(JdbcDriverBuildItem::getDbKind).collect(Collectors.joining(\"','\")),\n                DataSourceUtil.dataSourcePropertyKey(dataSourceName, \"jdbc\")));\n    }\n}\n","sourceCodeStart":242,"sourceCodeEnd":269,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/agroal/deployment/src/main/java/io/quarkus/agroal/deployment/component/DataSourceDefinitionBlockingProcessor.java#L242-L269","documentation":"When no explicit driver is configured, Agroal resolves a driver from registered JdbcDriverBuildItems by matching the datasource's db-kind. resolveDriver() throws this ConfigurationException when no registered driver matches the database kind, listing the available kinds and suggesting how to disable the JDBC datasource.","triggerScenarios":"definition() -> resolveDriver() finds no matchingJdbcDriver for dbKind of dataSourceName; String.format builds the message with the kind, datasource description, available db-kinds, and the quarkus.datasource.jdbc (or named) disable key.","commonSituations":"db-kind typo (e.g. 'postgres' instead of 'postgresql'); missing JDBC driver extension (only reactive driver present); using an unsupported database kind with no manual driver defined.","solutions":["Fix the db-kind value to one of the listed available kinds (e.g. postgresql, mariadb, mssql, h2).","Add the matching JDBC driver extension (e.g. quarkus-jdbc-postgresql).","Or define the driver manually via quarkus.datasource.jdbc.driver and add a driver dependency.","Or disable the JDBC datasource with quarkus.datasource.jdbc=false (or quarkus.datasource.<name>.jdbc=false) if not needed."],"exampleFix":"// before\nquarkus.datasource.db-kind=postgres // unknown kind\n// after\nquarkus.datasource.db-kind=postgresql","handlingStrategy":"validation","validationCode":"String kind = ConfigProvider.getConfig().getValue(\"quarkus.datasource.db-kind\", String.class);\nSet<String> known = Set.of(\"postgresql\", \"h2\", \"mariadb\", \"mysql\", \"mssql\", \"oracle\", \"db2\", \"derby\");\nif (!known.contains(kind)) throw new IllegalStateException(\"Unknown db-kind: \" + kind);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use exact db-kind values (postgresql, not postgres).","Add the corresponding quarkus-jdbc-* extension for the chosen db-kind.","Disable the JDBC datasource (quarkus.datasource.jdbc=false) when only reactive access is needed."],"tags":["quarkus","agroal","jdbc","db-kind","driver-resolution","build-time"],"backgroundTag":"jdbc-driver-not-found","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}