quarkusio/quarkus · error · ConfigurationException
quarkus.datasource.url and quarkus.datasource.driver have…
Error message
quarkus.datasource.url and quarkus.datasource.driver have been deprecated in Quarkus 1.3 and removed in 1.9. Please use the new datasource configuration as explained in https://quarkus.io/guides/datasource.
What it means
During Quarkus build, DataSourceProcessorSupport.defineDataSources validates legacy datasource configuration. The properties quarkus.datasource.url and quarkus.datasource.driver were deprecated in Quarkus 1.3 and removed in 1.9; setting either in application.properties aborts the build with this ConfigurationException pointing to the datasource migration guide.
Solutions
- Replace quarkus.datasource.url with quarkus.datasource.jdbc.url=jdbc:<db>://...
- Replace quarkus.datasource.driver with quarkus.datasource.jdbc.driver=<driver class> (usually unnecessary — the db-kind infers it)
- Set quarkus.datasource.db-kind=postgresql|mysql|mariadb|db2|mssql|h2 as required by the new config model
- Follow the migration guide at https://quarkus.io/guides/datasource for username/password key renames too
Example fix
# before quarkus.datasource.url=jdbc:postgresql://localhost:5432/mydb quarkus.datasource.driver=org.postgresql.Driver # after quarkus.datasource.db-kind=postgresql quarkus.datasource.username=app quarkus.datasource.password=secret quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/mydb
Defensive patterns
Strategy: validation
Validate before calling
// fail fast in CI before building ! grep -E '^quarkus\.datasource\.(url|driver)=' src/main/resources/application.properties \ || (echo 'Use quarkus.datasource.jdbc.url / db-kind'; exit 1)
Try / catch
// build-time error; handle only in tooling that catches ConfigurationException
try {
quarkusBuild();
} catch (ConfigurationException e) {
migrateDatasourceProperties(); // rewrite to quarkus.datasource.jdbc.*
} Prevention
- Grep CI for quarkus.datasource.url / quarkus.datasource.driver before upgrading
- Always set quarkus.datasource.db-kind and use quarkus.datasource.jdbc.url
- Track the Quarkus migration guides on version upgrades
- Use quarkus.datasource."<name>".* for named datasources, not legacy keys
When it happens
Trigger: application.properties (or -Dsystem properties / profile files) containing quarkus.datasource.url=... or quarkus.datasource.driver=... while building or starting the application in dev mode; applies to the default datasource and any named ones checked by this processor.
Common situations: Upgrading an application from Quarkus 1.x to 1.9+/2.x without migrating config; copying old tutorials or blog snippets; CI builds failing after a framework version bump.
Related errors
- Deferred datasource name is missing - you can configure it…
- JDBC Store configured but the
- JDBC Store configured but the
- No datasource named ' ' exists
- Quartz datasource resolution can be either deferred to…
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/28488d4ec270fd6d.
Report an issue: GitHub.
Appendix: source
Thrown at extensions/datasource/deployment/src/main/java/io/quarkus/datasource/deployment/component/DataSourceProcessorSupport.java:64
}
// TODO possible improvement: we could ignore configuration when the JDBC datasource can't be requested for JDBC
// (see DataSourceLookupBuildItem) but can be requested for Reactive, and vice-versa?
// See similar code in io.quarkus.hibernate.orm.deployment.component.PersistenceUnitDefinitionSupport.collectPersistenceUnitRequestsFromConfiguration
dataSourceRequests.produce(new DataSourceRequestBuildItem(name, paradigm,
String.format(Locale.ROOT, "Configuration '%s'",
DataSourceUtil.dataSourcePropertyKey(name, radicalWildcard))));
}
}
public static Set<String> defineDataSources(ProgrammingParadigm paradigm,
DataSourcesBuildTimeConfig config,
DataSourceLookupBuildItem lookupBuildItem,
List<DataSourceRequestBuildItem> dataSourceReferences,
BuildProducer<ValidationPhaseBuildItem.ValidationErrorBuildItem> validationErrors) {
if (config.driver().isPresent() || config.url().isPresent()) {
throw new ConfigurationException(
"quarkus.datasource.url and quarkus.datasource.driver have been deprecated in Quarkus 1.3 and removed in 1.9. "
+ "Please use the new datasource configuration as explained in https://quarkus.io/guides/datasource.");
}
Set<String> defined = new LinkedHashSet<>();
// Collect all relevant datasource names that are requested for the current paradigm, with their reasons
Map<String, List<Reason>> dataSourceNamesWithReasons = new LinkedHashMap<>();
for (DataSourceRequestBuildItem dsReq : dataSourceReferences) {
if (paradigm.equals(dsReq.getParadigm())) {
dataSourceNamesWithReasons.computeIfAbsent(dsReq.getName(), k -> new ArrayList<>())
.add(dsReq.getReason());
}
}
// If no datasource was requested for the current paradigm at all,
// and there can be a default datasource (for our current paradigm),
// then we'll define that default datasource.View on GitHub (pinned to e1c734241f)