{"record":{"id":"bb67b29522c705fd","repo":"quarkusio/quarkus","slug":"jdbc-store-configured-but-the-s-datasource-is-n-bb67b2","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":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzSupport.java","lineNumber":49,"sourceCode":"\n        if (dataSources == null) {\n            this.driverDialect = driverDialect;\n        } else {\n            if (runtimeConfig.deferredDatasourceName().isEmpty()) {\n                throw new ConfigurationException(\n                        \"Deferred datasource name is missing - you can configure it via quarkus.quartz.deferred-datasource-name.\");\n            }\n            // Determine the driver dialect\n            Optional<JDBCDataSource> selectedDataSource = dataSources.stream()\n                    .filter(i -> runtimeConfig.deferredDatasourceName().get().equals(i.getName()))\n                    .findFirst();\n\n            if (!selectedDataSource.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                        runtimeConfig.deferredDatasourceName().isPresent() ? runtimeConfig.deferredDatasourceName().get()\n                                : \"default\");\n                throw new ConfigurationException(message);\n            }\n\n            String dataSourceKind = selectedDataSource.get().getDbKind();\n            if (DatabaseKind.isPostgreSQL(dataSourceKind)) {\n                this.driverDialect = Optional.of(QuarkusPostgreSQLDelegate.class.getName());\n            } else if (DatabaseKind.isH2(dataSourceKind)) {\n                this.driverDialect = Optional.of(QuarkusHSQLDBDelegate.class.getName());\n            } else if (DatabaseKind.isMsSQL(dataSourceKind)) {\n                this.driverDialect = Optional.of(QuarkusMSSQLDelegate.class.getName());\n            } else if (DatabaseKind.isDB2(dataSourceKind)) {\n                this.driverDialect = Optional.of(QuarkusDBv8Delegate.class.getName());\n            } else {\n                this.driverDialect = Optional.of(QuarkusStdJDBCDelegate.class.getName());\n            }\n        }\n    }\n\n    public QuartzRuntimeConfig getRuntimeConfig() {","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzSupport.java#L31-L67","documentation":"This ConfigurationException is thrown by the Quartz extension's QuartzSupport constructor at startup when quarkus.quartz.store-type is set to 'jdbc' (JDBC store enabled via dataSources being present) but no registered JDBC datasource matches quarkus.quartz.deferred-datasource-name. Quartz needs a working datasource to persist jobs in the database, so the application aborts startup instead of silently running with a broken job store. It is a configuration problem, not a runtime failure.","triggerScenarios":"quarkus.quartz.store-type=jdbc (or job store configured for JDBC) while the datasource name set via quarkus.quartz.deferred-datasource-name does not match any aggregated JDBCDataSource build item — i.e. the named datasource has no connection definition, wrong name, or no datasource is configured at all.","commonSituations":"Typo in quarkus.quartz.deferred-datasource-name; datasource defined only in a dev/test profile; datasource removed after switching to JDBC store; using the default '<default>' name while the app defines only named datasources (e.g. 'users'); forgetting quarkus.datasource.db-kind or the JDBC driver dependency so the datasource is not registered.","solutions":["Add a properly configured datasource: quarkus.datasource.db-kind=postgresql plus quarkus.datasource.username/password and the JDBC driver dependency (e.g. quarkus-jdbc-postgresql).","Make sure quarkus.quartz.deferred-datasource-name exactly matches the configured datasource name (omit it entirely for the '<default>' datasource).","If you don't need persistent jobs, set quarkus.quartz.store-type=memory instead of jdbc.","Verify the datasource is defined in the active profile (profile-prefixed properties like %prod.quarkus.datasource.* must apply at startup)."],"exampleFix":"# before\nquarkus.quartz.store-type=jdbc\nquarkus.quartz.deferred-datasource-name=appdb\n# (no appdb datasource configured)\n\n# after\nquarkus.quartz.store-type=jdbc\nquarkus.quartz.deferred-datasource-name=appdb\nquarkus.datasource.appdb.db-kind=postgresql\nquarkus.datasource.appdb.username=quartz\nquarkus.datasource.appdb.password=secret\nquarkus.datasource.appdb.jdbc.url=jdbc:postgresql://localhost:5432/quartz","handlingStrategy":"validation","validationCode":"// application.properties pre-check (conceptual)\n// required together:\n// quarkus.quartz.store-type=jdbc\n// quarkus.quartz.deferred-datasource-name=<name>\n// quarkus.datasource.<name>.db-kind=... (+ driver dep)\nif (!props.containsKey(\"quarkus.datasource.\" + quartzDsName + \".db-kind\")) {\n    throw new IllegalStateException(\"Quartz JDBC store: datasource '\" + quartzDsName + \"' has no db-kind configured\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep the deferred-datasource-name value identical to the quarkus.datasource.<name> prefix; grep your application.properties for both before starting.","Omit quarkus.quartz.deferred-datasource-name entirely when using the default datasource.","Add a smoke test with @QuarkusTest that boots the app with store-type=jdbc so startup fails in CI, not in production.","Ensure the JDBC driver extension (quarkus-jdbc-postgresql etc.) is a project dependency."],"tags":["quarkus","quartz","datasource","configuration","startup"],"backgroundTag":"missing-datasource-configuration","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"}