{"record":{"id":"cfdf688ed6f9b2f4","repo":"quarkusio/quarkus","slug":"jdbc-store-configured-but-the-s-datasource-is-n","errorCode":null,"errorMessage":"JDBC Store configured but the '%s' datasource is not configured properly. You can configure your datasource by following the guide available at: https://quarkus.io/guides/datasource","messagePattern":"JDBC Store configured but the '(.+?)' datasource is not configured properly\\. You can configure your datasource by following the guide available at: https://quarkus\\.io/guides/datasource","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/quartz/deployment/src/main/java/io/quarkus/quartz/deployment/QuartzProcessor.java","lineNumber":199,"sourceCode":"                // Defer driver resolution to runtime\n                List<JDBCDataSource> dataSources = new ArrayList<>();\n                for (JdbcDataSourceBuildItem jdbcDataSourceBuildItem : jdbcDataSourceBuildItems) {\n                    dataSources.add(new JDBCDataSource(jdbcDataSourceBuildItem.getName(), jdbcDataSourceBuildItem.isDefault(),\n                            jdbcDataSourceBuildItem.getDbKind()));\n                }\n                return new QuartzJDBCDriverDialectBuildItem(Optional.empty(), dataSources);\n            } else {\n                // Perform driver resolution at build time\n                Optional<JdbcDataSourceBuildItem> selectedJdbcDataSourceBuildItem = jdbcDataSourceBuildItems.stream()\n                        .filter(i -> config.dataSourceName().isPresent() ? config.dataSourceName().get().equals(i.getName())\n                                : i.isDefault())\n                        .findFirst();\n\n                if (!selectedJdbcDataSourceBuildItem.isPresent()) {\n                    String message = String.format(\n                            \"JDBC Store configured but the '%s' datasource is not configured properly. You can configure your datasource by following the guide available at: https://quarkus.io/guides/datasource\",\n                            config.dataSourceName().isPresent() ? config.dataSourceName().get() : \"default\");\n                    throw new ConfigurationException(message);\n                }\n                return new QuartzJDBCDriverDialectBuildItem(Optional.of(guessDriver(selectedJdbcDataSourceBuildItem.get())),\n                        null);\n            }\n        }\n    }\n\n    private String guessDriver(JdbcDataSourceBuildItem jdbcDataSource) {\n        String dataSourceKind = jdbcDataSource.getDbKind();\n        if (DatabaseKind.isPostgreSQL(dataSourceKind)) {\n            return QuarkusPostgreSQLDelegate.class.getName();\n        }\n        if (DatabaseKind.isH2(dataSourceKind)) {\n            return QuarkusHSQLDBDelegate.class.getName();\n        }\n        if (DatabaseKind.isMsSQL(dataSourceKind)) {\n            return QuarkusMSSQLDelegate.class.getName();\n        }","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/quartz/deployment/src/main/java/io/quarkus/quartz/deployment/QuartzProcessor.java#L181-L217","documentation":"A JDBC job store is configured for Quartz and resolution is not deferred, so at build time QuartzProcessor searches JdbcDataSourceBuildItems for the datasource named by quarkus.quartz.datasource (or the default datasource when none is set). When no matching configured datasource exists, the build fails, pointing to the datasource guide. The Agroal datasource backing the Quartz tables was never configured.","triggerScenarios":"quarkus.quartz.store-type=jdbc-job-store (or clustered=true) with quarkus.quartz.datasource=<name> where no datasource with that name is configured (missing quarkus.datasource.<name>.db-kind etc.); or no quarkus.quartz.datasource set and the default datasource is not configured (missing quarkus.datasource.db-kind / jdbc.url).","commonSituations":"Typo in the named datasource; configuring only a dev-mode datasource so the build-time check fails; forgetting quarkus.datasource.db-kind after adding jdbc-job-store; clustering Quartz across services where one service lacks the datasource config.","solutions":["Configure the referenced datasource: quarkus.datasource.db-kind=postgresql, quarkus.datasource.username=..., quarkus.datasource.jdbc.url=... (or quarkus.datasource.\"<name>\".* for named datasources).","Make sure quarkus.quartz.datasource exactly matches a configured named datasource (or remove it to use the default).","Add the Agroal extension plus the matching JDBC driver extension (e.g. quarkus-jdbc-postgresql) - required for any JDBC store.","If datasource config is only known at runtime, set quarkus.quartz.defer-datasource-check=true instead (and remove quarkus.quartz.datasource)."],"exampleFix":"// before\nquarkus.quartz.store-type=jdbc-job-store\nquarkus.quartz.datasource=schedulerds\n// no such datasource configured\n\n// after\nquarkus.datasource.schedulerds.db-kind=postgresql\nquarkus.datasource.schedulerds.username=quartz\nquarkus.datasource.schedulerds.jdbc.url=jdbc:postgresql://localhost:5432/quartz\nquarkus.quartz.store-type=jdbc-job-store\nquarkus.quartz.datasource=schedulerds","handlingStrategy":"validation","validationCode":"// Before enabling the JDBC store, ensure the datasource is configured:\n// quarkus.datasource.schedulerds.db-kind=postgresql\n// quarkus.datasource.schedulerds.jdbc.url=jdbc:postgresql://localhost:5432/quartz\n// and the driver extension (e.g. quarkus-jdbc-postgresql) on the classpath.\n// Smoke-check at startup:\n@Inject AgroalDataSource ds; // injection of the named datasource must succeed\n// or in a startup observer: ds.getConfiguration().getConnectionPoolConfiguration()","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always configure quarkus.datasource.db-kind (or <name>.db-kind) when switching store-type to jdbc-job-store.","Add the matching quarkus-jdbc-<db> extension alongside quarkus-quartz and quarkus-agroal.","Use exact datasource names; watch for typos and quoting (quarkus.datasource.\"name\").","Run a @QuarkusTest with the JDBC store enabled to catch config gaps in CI."],"tags":["quarkus","quartz","datasource","jdbc-store","configuration"],"backgroundTag":"datasource-not-configured","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}