quarkusio/quarkus · error · ConfigurationException
JDBC Store configured but the '%s' datasource is not configu
Error message
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
What it means
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.
Source
Thrown at extensions/quartz/deployment/src/main/java/io/quarkus/quartz/deployment/QuartzProcessor.java:199
// Defer driver resolution to runtime
List<JDBCDataSource> dataSources = new ArrayList<>();
for (JdbcDataSourceBuildItem jdbcDataSourceBuildItem : jdbcDataSourceBuildItems) {
dataSources.add(new JDBCDataSource(jdbcDataSourceBuildItem.getName(), jdbcDataSourceBuildItem.isDefault(),
jdbcDataSourceBuildItem.getDbKind()));
}
return new QuartzJDBCDriverDialectBuildItem(Optional.empty(), dataSources);
} else {
// Perform driver resolution at build time
Optional<JdbcDataSourceBuildItem> selectedJdbcDataSourceBuildItem = jdbcDataSourceBuildItems.stream()
.filter(i -> config.dataSourceName().isPresent() ? config.dataSourceName().get().equals(i.getName())
: i.isDefault())
.findFirst();
if (!selectedJdbcDataSourceBuildItem.isPresent()) {
String message = String.format(
"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",
config.dataSourceName().isPresent() ? config.dataSourceName().get() : "default");
throw new ConfigurationException(message);
}
return new QuartzJDBCDriverDialectBuildItem(Optional.of(guessDriver(selectedJdbcDataSourceBuildItem.get())),
null);
}
}
}
private String guessDriver(JdbcDataSourceBuildItem jdbcDataSource) {
String dataSourceKind = jdbcDataSource.getDbKind();
if (DatabaseKind.isPostgreSQL(dataSourceKind)) {
return QuarkusPostgreSQLDelegate.class.getName();
}
if (DatabaseKind.isH2(dataSourceKind)) {
return QuarkusHSQLDBDelegate.class.getName();
}
if (DatabaseKind.isMsSQL(dataSourceKind)) {
return QuarkusMSSQLDelegate.class.getName();
}View on GitHub (pinned to e1c734241f)
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).
Example fix
// before quarkus.quartz.store-type=jdbc-job-store quarkus.quartz.datasource=schedulerds // no such datasource configured // after quarkus.datasource.schedulerds.db-kind=postgresql quarkus.datasource.schedulerds.username=quartz quarkus.datasource.schedulerds.jdbc.url=jdbc:postgresql://localhost:5432/quartz quarkus.quartz.store-type=jdbc-job-store quarkus.quartz.datasource=schedulerds
Defensive patterns
Strategy: validation
Validate before calling
// Before enabling the JDBC store, ensure the datasource is configured: // quarkus.datasource.schedulerds.db-kind=postgresql // quarkus.datasource.schedulerds.jdbc.url=jdbc:postgresql://localhost:5432/quartz // and the driver extension (e.g. quarkus-jdbc-postgresql) on the classpath. // Smoke-check at startup: @Inject AgroalDataSource ds; // injection of the named datasource must succeed // or in a startup observer: ds.getConfiguration().getConnectionPoolConfiguration()
Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- Quartz datasource resolution can be either deferred to runti
- Deferred datasource name is missing - you can configure it v
- JDBC Store configured but the '%s' datasource is not configu
- No datasource named '<dataSourceName>' exists
- quarkus.datasource.url and quarkus.datasource.driver have be
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/cfdf688ed6f9b2f4.
Report an issue: GitHub.