quarkusio/quarkus · error · IllegalStateException
A runtime config property value differs from the value that
Error message
A runtime config property value differs from the value that was injected during the static intialization phase: <mismatches> If that's intentional then annotate the injected field/parameter with @io.quarkus.runtime.annotations.StaticInitSafe to eliminate the false positive.
What it means
Error "A runtime config property value differs from the value that was injected during the static intialization phase: <mismatches> If that's intentional then annotate the injected field/parameter with @io.quarkus.runtime.annotations.StaticInitSafe to eliminate the false positive." thrown in quarkusio/quarkus.
Source
Thrown at extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/ConfigStaticInitValues.java:59
return;
}
SmallRyeConfig config = ConfigProvider.getConfig().unwrap(SmallRyeConfig.class);
List<String> mismatches = new ArrayList<>();
for (InjectedValue injectedValue : injectedValues) {
ConfigValue currentValue = config.getConfigValue(injectedValue.name);
if (currentValue.getValue() != null
&& !Objects.equals(currentValue.getValue(), injectedValue.value)) {
// Config property is set at runtime and the value differs from the value injected during STATIC_INIT bootstrap phase
mismatches.add(
" - the runtime value of '" + injectedValue.name + "' is [" + currentValue.getValue()
+ "] but the value [" + injectedValue.value
+ "] was injected into "
+ injectedValue.injectionPointInfo);
}
}
injectedValues.clear();
if (!mismatches.isEmpty()) {
throw new IllegalStateException(
"A runtime config property value differs from the value that was injected during the static intialization phase:\n"
+ String.join("\n", mismatches)
+ "\n\nIf that's intentional then annotate the injected field/parameter with @io.quarkus.runtime.annotations.StaticInitSafe to eliminate the false positive.");
}
}
private static class InjectedValue {
private final String injectionPointInfo;
private final String name;
private final String value;
private InjectedValue(InjectionPoint injectionPoint, String name, String value) {
this.injectionPointInfo = injectionPointToString(injectionPoint);
this.name = name;
this.value = value;
}
View on GitHub (pinned to e1c734241f)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/ConfigStaticInitValues.java:59 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/dd955ec054d365f4.
Report an issue: GitHub.