{"record":{"id":"a99d72a26ddae1a7","repo":"quarkusio/quarkus","slug":"jdbc-store-configured-but-s-datasource-is-missi","errorCode":null,"errorMessage":"JDBC Store configured but '%s' datasource is missing. You can configure your datasource by following the guide available at: https://quarkus.io/guides/datasource","messagePattern":"JDBC Store configured but '(.+?)' datasource is missing\\. You can configure your datasource by following the guide available at: https://quarkus\\.io/guides/datasource","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuarkusQuartzConnectionPoolProvider.java","lineNumber":35,"sourceCode":"    private AgroalDataSource dataSource;\n    private static String dataSourceName;\n\n    public QuarkusQuartzConnectionPoolProvider() {\n        final ArcContainer container = Arc.container();\n        final InstanceHandle<AgroalDataSource> instanceHandle;\n        final boolean useDefaultDataSource = \"QUARKUS_QUARTZ_DEFAULT_DATASOURCE\".equals(dataSourceName);\n        if (useDefaultDataSource) {\n            instanceHandle = container.instance(AgroalDataSource.class);\n        } else {\n            instanceHandle = container.instance(AgroalDataSource.class, new DataSourceLiteral(dataSourceName));\n        }\n        if (instanceHandle.isAvailable()) {\n            this.dataSource = instanceHandle.get();\n        } else {\n            String message = String.format(\n                    \"JDBC Store configured but '%s' datasource is missing. You can configure your datasource by following the guide available at: https://quarkus.io/guides/datasource\",\n                    useDefaultDataSource ? \"default\" : dataSourceName);\n            throw new IllegalStateException(message);\n        }\n    }\n\n    @Override\n    public DataSource getDataSource() {\n        return dataSource;\n    }\n\n    @Override\n    public Connection getConnection() throws SQLException {\n        return dataSource.getConnection();\n    }\n\n    @Override\n    public void shutdown() {\n        // Do nothing as the connection will be closed inside the Agroal extension\n    }\n","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuarkusQuartzConnectionPoolProvider.java#L17-L53","documentation":"QuarkusQuartzConnectionPoolProvider resolves the DataSource backing the Quartz JDBC job store at startup. When the configured (or default) datasource is not present/available, it throws IllegalStateException with this message pointing to the datasource guide. This happens in the constructor before any Quartz scheduling starts.","triggerScenarios":"quarkus.quartz.store-type=jdbc-store is set but no Agroal datasource instance named by quarkus.quartz.datasource (or the default datasource) is registered/available in the container.","commonSituations":"Using jdbc-store without adding the Agroal extension or datasource config; misspelled quarkus.quartz.datasource name; named datasource defined only in a non-active profile; datasource bean failed to initialize earlier.","solutions":["Configure the default datasource (quarkus.datasource.db-kind, username, password, jdbc.url) or the named one referenced by quarkus.quartz.datasource.","Add quarkus-agroal and the matching JDBC driver extension to the project.","Check the quarkus.quartz.datasource value matches an existing named datasource configuration.","Verify the datasource is available in the active profile (dev/test/prod config)."],"exampleFix":"# before (no datasource)\nquarkus.quartz.store-type=jdbc-store\n\n# after\nquarkus.quartz.store-type=jdbc-store\nquarkus.datasource.db-kind=postgresql\nquarkus.datasource.username=quartz\nquarkus.datasource.password=secret\nquarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/quartz","handlingStrategy":"validation","validationCode":"// before enabling jdbc-store, confirm the datasource config exists\n// (e.g. in a startup check or test)\nString dsName = \"default\"; // or value of quarkus.quartz.datasource\nif (ConfigProvider.getConfig().getOptionalValue(\"quarkus.datasource.\" + (dsName.equals(\"default\") ? \"\" : dsName + \".\") + \"jdbc.url\", String.class).isEmpty()) {\n    throw new IllegalStateException(\"Quartz jdbc-store requires datasource '\" + dsName + \"' to be configured\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    scheduler = quartzSchedulerProducer.get();\n} catch (IllegalStateException e) {\n    if (e.getMessage().contains(\"datasource is missing\")) {\n        log.error(\"Configure the Quartz JDBC datasource per https://quarkus.io/guides/datasource\");\n    }\n    throw e;\n}","preventionTips":["Add quarkus-agroal plus the driver extension whenever store-type=jdbc-store.","Keep quarkus.quartz.datasource aligned with a named datasource defined in all profiles.","Smoke-test startup in dev mode before packaging."],"tags":["quarkus","quartz","datasource","jdbc","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"}