{"record":{"id":"28488d4ec270fd6d","repo":"quarkusio/quarkus","slug":"quarkus-datasource-url-and-quarkus-datasource-driv","errorCode":null,"errorMessage":"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.","messagePattern":"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\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/datasource/deployment/src/main/java/io/quarkus/datasource/deployment/component/DataSourceProcessorSupport.java","lineNumber":64,"sourceCode":"            }\n\n            // TODO possible improvement: we could ignore configuration when the JDBC datasource can't be requested for JDBC\n            //   (see DataSourceLookupBuildItem) but can be requested for Reactive, and vice-versa?\n            //   See similar code in io.quarkus.hibernate.orm.deployment.component.PersistenceUnitDefinitionSupport.collectPersistenceUnitRequestsFromConfiguration\n\n            dataSourceRequests.produce(new DataSourceRequestBuildItem(name, paradigm,\n                    String.format(Locale.ROOT, \"Configuration '%s'\",\n                            DataSourceUtil.dataSourcePropertyKey(name, radicalWildcard))));\n        }\n    }\n\n    public static Set<String> defineDataSources(ProgrammingParadigm paradigm,\n            DataSourcesBuildTimeConfig config,\n            DataSourceLookupBuildItem lookupBuildItem,\n            List<DataSourceRequestBuildItem> dataSourceReferences,\n            BuildProducer<ValidationPhaseBuildItem.ValidationErrorBuildItem> validationErrors) {\n        if (config.driver().isPresent() || config.url().isPresent()) {\n            throw new ConfigurationException(\n                    \"quarkus.datasource.url and quarkus.datasource.driver have been deprecated in Quarkus 1.3 and removed in 1.9. \"\n                            + \"Please use the new datasource configuration as explained in https://quarkus.io/guides/datasource.\");\n        }\n\n        Set<String> defined = new LinkedHashSet<>();\n\n        // Collect all relevant datasource names that are requested for the current paradigm, with their reasons\n        Map<String, List<Reason>> dataSourceNamesWithReasons = new LinkedHashMap<>();\n        for (DataSourceRequestBuildItem dsReq : dataSourceReferences) {\n            if (paradigm.equals(dsReq.getParadigm())) {\n                dataSourceNamesWithReasons.computeIfAbsent(dsReq.getName(), k -> new ArrayList<>())\n                        .add(dsReq.getReason());\n            }\n        }\n\n        // If no datasource was requested for the current paradigm at all,\n        // and there can be a default datasource (for our current paradigm),\n        // then we'll define that default datasource.","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/datasource/deployment/src/main/java/io/quarkus/datasource/deployment/component/DataSourceProcessorSupport.java#L46-L82","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"# before\nquarkus.datasource.url=jdbc:postgresql://localhost:5432/mydb\nquarkus.datasource.driver=org.postgresql.Driver\n# after\nquarkus.datasource.db-kind=postgresql\nquarkus.datasource.username=app\nquarkus.datasource.password=secret\nquarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/mydb","handlingStrategy":"validation","validationCode":"// fail fast in CI before building\n! grep -E '^quarkus\\.datasource\\.(url|driver)=' src/main/resources/application.properties \\\n  || (echo 'Use quarkus.datasource.jdbc.url / db-kind'; exit 1)","typeGuard":null,"tryCatchPattern":"// build-time error; handle only in tooling that catches ConfigurationException\ntry {\n    quarkusBuild();\n} catch (ConfigurationException e) {\n    migrateDatasourceProperties(); // rewrite to quarkus.datasource.jdbc.*\n}","preventionTips":["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"],"tags":["configuration","datasource","migration","quarkus"],"backgroundTag":"removed-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"}