{"record":{"id":"0809f95db2eedfa0","repo":"quarkusio/quarkus","slug":"deferred-datasource-name-is-missing-you-can-conf","errorCode":null,"errorMessage":"Deferred datasource name is missing - you can configure it via quarkus.quartz.deferred-datasource-name.","messagePattern":"Deferred datasource name is missing - you can configure it via quarkus\\.quartz\\.deferred-datasource-name\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzSupport.java","lineNumber":36,"sourceCode":"public class QuartzSupport {\n\n    private final QuartzRuntimeConfig runtimeConfig;\n    private final QuartzBuildTimeConfig buildTimeConfig;\n    private final Optional<String> driverDialect;\n    // <FQCN>#<method_name>\n    private final Set<String> nonconcurrentMethods;\n\n    public QuartzSupport(QuartzRuntimeConfig runtimeConfig, QuartzBuildTimeConfig buildTimeConfig,\n            Optional<String> driverDialect, List<JDBCDataSource> dataSources, Set<String> nonconcurrentMethods) {\n        this.runtimeConfig = runtimeConfig;\n        this.buildTimeConfig = buildTimeConfig;\n        this.nonconcurrentMethods = Set.copyOf(nonconcurrentMethods);\n\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());","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzSupport.java#L18-L54","documentation":"When Quarkus is configured with a Quartz store requiring a database (store-type=jdbc / deferred datasources), QuartzSupport requires the name of the datasource Quartz should use. If dataSources are supplied but runtimeConfig.deferredDatasourceName() is empty, it throws this SmallRye Config ConfigurationException, failing the application start with a clear message.","triggerScenarios":"Building the QuartzSupport runtime config when dataSources are non-null (database-backed store selected) and quarkus.quartz.deferred-datasource-name is not set.","commonSituations":"Switching quarkus.quartz.store-type to a JDBC-backed store without setting the deferred datasource name; multiple datasources where the intended one is not named; copying config from docs but omitting the property; typo in the property name so it is never picked up.","solutions":["Set quarkus.quartz.deferred-datasource-name=<your-datasource-name> in application.properties matching the configured Agroal datasource name","Confirm the datasource exists and its quarkus.datasource.<name> configuration is present and active","If no persistent store is needed, change quarkus.quartz.store-type back to memory so no datasource is required","Check property spelling/location (profile-specific files may hide or override the property)"],"exampleFix":"// before (application.properties)\nquarkus.quartz.store-type=jdbc\n# missing datasource name\n// after\nquarkus.quartz.store-type=jdbc\nquarkus.quartz.deferred-datasource-name=my-ds\nquarkus.datasource.my-ds.db-kind=postgresql\nquarkus.datasource.my-ds.username=quartz\nquarkus.datasource.my-ds.jdbc.url=jdbc:postgresql://localhost:5432/quartz","handlingStrategy":"validation","validationCode":"// Fail fast before Quarkus does: check the deferred datasource is configured\nif (Set.of(\"jdbc\", \"todo-db\").contains(cfg.storeType())\n        && (cfg.deferredDatasourceName() == null || cfg.deferredDatasourceName().isEmpty())) {\n    throw new IllegalArgumentException(\n        \"quarkus.quartz.deferred-datasource-name is required for store-type \" + cfg.storeType());\n}","typeGuard":null,"tryCatchPattern":"try {\n    application.start(); // or build QuartzSupport\n} catch (Exception e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"Deferred datasource name is missing\")) {\n        LOG.error(\"Set quarkus.quartz.deferred-datasource-name to your Agroal datasource name\");\n    }\n    throw e;\n}","preventionTips":["Always pair store-type=jdbc/todo-db with quarkus.quartz.deferred-datasource-name","Ensure the named datasource exists under quarkus.datasource.<name>.*","Add a startup integration test that exercises the Quartz store config","Avoid mixing datasource names across profiles (dev/test/prod)"],"tags":["quarkus","quartz","configuration","datasource","startup-failure"],"backgroundTag":"missing-config-property","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"}