{"record":{"id":"dd955ec054d365f4","repo":"quarkusio/quarkus","slug":"a-runtime-config-property-value-differs-from-the-v","errorCode":null,"errorMessage":"A runtime config property value differs from the value that was injected during the static intialization phase:\n<mismatches>\n\nIf that's intentional then annotate the injected field/parameter with @io.quarkus.runtime.annotations.StaticInitSafe to eliminate the false positive.","messagePattern":"A runtime config property value differs from the value that was injected during the static intialization phase:\n<mismatches>\n\nIf that's intentional then annotate the injected field/parameter with @io\\.quarkus\\.runtime\\.annotations\\.StaticInitSafe to eliminate the false positive\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/ConfigStaticInitValues.java","lineNumber":59,"sourceCode":"            return;\n        }\n        SmallRyeConfig config = ConfigProvider.getConfig().unwrap(SmallRyeConfig.class);\n        List<String> mismatches = new ArrayList<>();\n        for (InjectedValue injectedValue : injectedValues) {\n            ConfigValue currentValue = config.getConfigValue(injectedValue.name);\n            if (currentValue.getValue() != null\n                    && !Objects.equals(currentValue.getValue(), injectedValue.value)) {\n                // Config property is set at runtime and the value differs from the value injected during STATIC_INIT bootstrap phase\n                mismatches.add(\n                        \" - the runtime value of '\" + injectedValue.name + \"' is [\" + currentValue.getValue()\n                                + \"] but the value [\" + injectedValue.value\n                                + \"] was injected into \"\n                                + injectedValue.injectionPointInfo);\n            }\n        }\n        injectedValues.clear();\n        if (!mismatches.isEmpty()) {\n            throw new IllegalStateException(\n                    \"A runtime config property value differs from the value that was injected during the static intialization phase:\\n\"\n                            + String.join(\"\\n\", mismatches)\n                            + \"\\n\\nIf that's intentional then annotate the injected field/parameter with @io.quarkus.runtime.annotations.StaticInitSafe to eliminate the false positive.\");\n        }\n    }\n\n    private static class InjectedValue {\n\n        private final String injectionPointInfo;\n        private final String name;\n        private final String value;\n\n        private InjectedValue(InjectionPoint injectionPoint, String name, String value) {\n            this.injectionPointInfo = injectionPointToString(injectionPoint);\n            this.name = name;\n            this.value = value;\n        }\n","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/ConfigStaticInitValues.java#L41-L77","documentation":"Error \"A runtime config property value differs from the value that was injected during the static intialization phase:\n<mismatches>\n\nIf that's intentional then annotate the injected field/parameter with @io.quarkus.runtime.annotations.StaticInitSafe to eliminate the false positive.\" thrown in quarkusio/quarkus.","triggerScenarios":"Thrown at extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/ConfigStaticInitValues.java:59 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Align the runtime configuration with the values present during static initialization (e.g., export the same env vars in the runtime environment)","Annotate the injected field or parameter with @io.quarkus.runtime.annotations.StaticInitSafe to declare the value intentionally static and silence the check","Audit which properties change between build/static-init and runtime (often container-injected env vars) and make them consistent"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}