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
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.
Source
Thrown at extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzSupport.java:49
if (dataSources == null) {
this.driverDialect = driverDialect;
} else {
if (runtimeConfig.deferredDatasourceName().isEmpty()) {
throw new ConfigurationException(
"Deferred datasource name is missing - you can configure it via quarkus.quartz.deferred-datasource-name.");
}
// Determine the driver dialect
Optional<JDBCDataSource> selectedDataSource = dataSources.stream()
.filter(i -> runtimeConfig.deferredDatasourceName().get().equals(i.getName()))
.findFirst();
if (!selectedDataSource.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",
runtimeConfig.deferredDatasourceName().isPresent() ? runtimeConfig.deferredDatasourceName().get()
: "default");
throw new ConfigurationException(message);
}
String dataSourceKind = selectedDataSource.get().getDbKind();
if (DatabaseKind.isPostgreSQL(dataSourceKind)) {
this.driverDialect = Optional.of(QuarkusPostgreSQLDelegate.class.getName());
} else if (DatabaseKind.isH2(dataSourceKind)) {
this.driverDialect = Optional.of(QuarkusHSQLDBDelegate.class.getName());
} else if (DatabaseKind.isMsSQL(dataSourceKind)) {
this.driverDialect = Optional.of(QuarkusMSSQLDelegate.class.getName());
} else if (DatabaseKind.isDB2(dataSourceKind)) {
this.driverDialect = Optional.of(QuarkusDBv8Delegate.class.getName());
} else {
this.driverDialect = Optional.of(QuarkusStdJDBCDelegate.class.getName());
}
}
}
public QuartzRuntimeConfig getRuntimeConfig() {View on GitHub (pinned to e1c734241f)
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).
Example fix
# before quarkus.quartz.store-type=jdbc quarkus.quartz.deferred-datasource-name=appdb # (no appdb datasource configured) # after quarkus.quartz.store-type=jdbc quarkus.quartz.deferred-datasource-name=appdb quarkus.datasource.appdb.db-kind=postgresql quarkus.datasource.appdb.username=quartz quarkus.datasource.appdb.password=secret quarkus.datasource.appdb.jdbc.url=jdbc:postgresql://localhost:5432/quartz
Defensive patterns
Strategy: validation
Validate before calling
// application.properties pre-check (conceptual)
// required together:
// quarkus.quartz.store-type=jdbc
// quarkus.quartz.deferred-datasource-name=<name>
// quarkus.datasource.<name>.db-kind=... (+ driver dep)
if (!props.containsKey("quarkus.datasource." + quartzDsName + ".db-kind")) {
throw new IllegalStateException("Quartz JDBC store: datasource '" + quartzDsName + "' has no db-kind configured");
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Quartz datasource resolution can be either deferred to runti
- JDBC Store configured but the '%s' datasource is not configu
- JDBC Store configured but '%s' datasource is missing. You ca
- Deferred datasource name is missing - you can configure it v
- Unable to find top command. Ensure you have a @CommandDefini
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/bb67b29522c705fd.
Report an issue: GitHub.