{"record":{"id":"c036dd10ae7654de","repo":"quarkusio/quarkus","slug":"failed-to-set-dev-services-config","errorCode":null,"errorMessage":"Failed to set dev services config","messagePattern":"Failed to set dev services config","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/runner/bootstrap/StartupActionImpl.java","lineNumber":358,"sourceCode":"                throw new IllegalStateException(\"Dev services cannot be started without a deployment class loader.\");\n            }\n            DevServicesRegistryBuildItem.DevServicesStartResult startResult = devServicesRegistry.startAll(\n                    devServicesResults, devServicesCustomizers, additionalConfigBuildItems, deploymentClassLoader);\n\n            devServicesProperties.putAll(startResult.configs());\n            setDevServicesConfigSourceValues(startResult);\n        }\n    }\n\n    private void setDevServicesConfigSourceValues(DevServicesRegistryBuildItem.DevServicesStartResult startResult) {\n        try {\n            Class<?> configSourceClass = runtimeClassLoader\n                    .loadClass(\"io.quarkus.devservice.runtime.config.DevServicesConfigSource\");\n            configSourceClass.getMethod(\"setConfig\", Map.class).invoke(null, startResult.configs());\n        } catch (ClassNotFoundException e) {\n            // devservices runtime module not available\n        } catch (ReflectiveOperationException e) {\n            throw new RuntimeException(\"Failed to set dev services config\", e);\n        }\n\n        try {\n            Class<?> overrideConfigSourceClass = runtimeClassLoader\n                    .loadClass(\"io.quarkus.devservice.runtime.config.DevServicesOverrideConfigSource\");\n            overrideConfigSourceClass.getMethod(\"setConfig\", Map.class).invoke(null, startResult.overrideConfigs());\n        } catch (ClassNotFoundException e) {\n            // devservices runtime module not available\n        } catch (ReflectiveOperationException e) {\n            throw new RuntimeException(\"Failed to set dev services override config\", e);\n        }\n    }\n\n    /**\n     * Runs the application, and returns a handle that can be used to shut it down.\n     */\n    public RunningQuarkusApplication run(String... args) throws Exception {\n","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/runner/bootstrap/StartupActionImpl.java#L340-L376","documentation":"After Dev Services start, StartupActionImpl reflectively injects the resulting config map into DevServicesConfigSource in the runtime class loader. If class loading succeeded but the reflective invocation fails (missing setConfig method, wrong signature, target threw), the code wraps it in RuntimeException(\"Failed to set dev services config\").","triggerScenarios":"Mismatch between the core deployment code and io.quarkus.devservice.runtime.config.DevServicesConfigSource — e.g. mixed Quarkus versions on the classpath where setConfig(Map) does not exist, or the method itself throwing during invocation.","commonSituations":"Upgrading core Quarkus without rebuilding/reloading dev extensions; custom builds of the devservices runtime module; parallel Quarkus versions in the local Maven repository.","solutions":["Rebuild with a consistent Quarkus version (mvn clean install) so deployment and devservices runtime modules match","Verify DevServicesConfigSource exposes a static setConfig(Map) method in your Quarkus version","Inspect the wrapped cause (e.getCause()) for the real reflective failure","Clear stale local artifacts of the io.quarkus devservice modules and re-resolve dependencies"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"try {\n    Class.forName(\"io.quarkus.devservice.runtime.config.DevServicesConfigSource\", true, runtimeClassLoader);\n} catch (ClassNotFoundException e) {\n    // devservices runtime module missing; skip config injection\n}","typeGuard":null,"tryCatchPattern":"try { action.run(); } catch (RuntimeException e) { if (\"Failed to set dev services config\".equals(e.getMessage())) { log.error(\"dev services config injection failed\", e.getCause()); } else { throw e; } }","preventionTips":["Keep all Quarkus modules at the same version","Rebuild after Quarkus upgrades","Inspect the chained cause for the reflective failure"],"tags":["quarkus","dev-services","reflection","config"],"backgroundTag":"dev-services-config-injection-failed","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"}