quarkusio/quarkus · error · IllegalArgumentException
Failed to find value for config property %s in application c
Error message
Failed to find value for config property %s in application configuration. Please provide the value for the property, e.g. by adding %s=<desired-value> to your application.properties
What it means
doGetConfigValue looks up a MicroProfile config property required to configure a REST client (typically its base URL). When the property is absent and it is marked required, the library throws IllegalArgumentException with guidance on adding the property to application.properties. If not required, it only logs a warning and returns null.
Source
Thrown at extensions/resteasy-reactive/rest-client/runtime/src/main/java/io/quarkus/rest/client/reactive/runtime/ConfigUtils.java:62
/**
* Obtains the value of the {@param configProperty} expression. This expressions MUST be in the form of ${...}
*/
public static String getConfigValue(String configProperty, boolean required) {
return doGetConfigValue(configProperty, required, stripPrefixAndSuffix(configProperty));
}
/**
* Obtains the value of the {@param propertyName} name, meaning that the name must NOT start with '${' or end with '}'
*/
public static String doGetConfigValue(String configPropertyName, boolean required, String propertyName) {
try {
Optional<String> optionalValue = ConfigProvider.getConfig().getOptionalValue(propertyName, String.class);
if (optionalValue.isEmpty()) {
String message = String.format("Failed to find value for config property %s in application configuration. "
+ "Please provide the value for the property, e.g. by adding %s=<desired-value> to your application.properties",
configPropertyName, propertyName);
if (required) {
throw new IllegalArgumentException(message);
}
log.warn(message);
}
return optionalValue.orElse(null);
} catch (IllegalArgumentException e) {
String message = "Failed to convert value for property " + configPropertyName + " to String";
if (required) {
throw new IllegalArgumentException(message, e);
} else {
log.warn(message);
return null;
}
}
}
private static String stripPrefixAndSuffix(String configProperty) {
// by now we know that configProperty is of form ${...}
return configProperty.substring(2, configProperty.length() - 1);View on GitHub (pinned to e1c734241f)
Solutions
- Add quarkus.rest-client.<name>.url=<value> to application.properties (or set the corresponding env var/system property)
- Check the config key matches the client's configKey/class name and the active profile (%dev, %prod)
- If the property may legitimately be absent, mark the lookup as non-required in the builder code that calls ConfigUtils
Example fix
# before # (nothing for my-client) # after quarkus.rest-client.my-client.url=http://localhost:8080
Defensive patterns
Strategy: validation
Validate before calling
Optional<String> url = ConfigProvider.getConfig().getOptionalValue("quarkus.rest-client.my-client.url", String.class);
if (url.isEmpty()) {
throw new IllegalStateException("quarkus.rest-client.my-client.url is not set; add it to application.properties");
} Try / catch
try {
// trigger client creation or first call
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("Failed to find value for config property")) {
throw new IllegalStateException("Missing rest-client config property — check application.properties and active profile", e);
}
throw e;
} Prevention
- Define quarkus.rest-client.<name>.url/uri for every @RegisterRestClient interface
- Check the active profile: properties under %prod are not visible in %dev
- Prefer env vars with the standard MicroProfile mapping for containerized deployments
When it happens
Trigger: @RegisterRestClient client configured via config key quarkus.rest-client.<name>.url / uri missing from application.properties and no environment variable or system property provides it at runtime.
Common situations: Forgetting the config key after adding a new @RegisterRestClient interface; renaming a client class so the old config key no longer matches; running in an environment where the expected env var is not set; config profile mismatch (prop defined only under %prod while running dev).
Related errors
- Unable to find provider for REST Client '${class}' with name
- Multiple providers found for REST Client '${class}'. Please
- Invalid expression: ${expression}
- Failed to convert value for property ${property} to String
- The configuration ${clazz} must be an interface annotated wi
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/eb9595aeea902a00.
Report an issue: GitHub.