quarkusio/quarkus · error · IllegalStateException
Failed to process configuration of ${config.getId()} registr
Error message
Failed to process configuration of ${config.getId()} registry: failed to cast ${providerValue} to String What it means
Thrown by ExtensionCatalogResolver.loadFromArtifact when the configured registry client-factory artifact value cannot be processed as a String containing valid artifact coordinates — either the configured value is not a String or it does not parse via ArtifactCoords.fromString. The registry id and offending value are included in the message.
Source
Thrown at independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/ExtensionCatalogResolver.java:151
if (provider != null) {
final URL url;
try {
url = new URL((String) provider);
} catch (MalformedURLException e) {
throw new IllegalStateException("Failed to translate " + provider + " to URL", e);
}
return loadFromUrl(url);
}
return getDefaultClientFactory();
}
public RegistryClientFactory loadFromArtifact(RegistryConfig config, final Object providerValue) {
ArtifactCoords providerArtifact;
try {
final String providerStr = (String) providerValue;
providerArtifact = ArtifactCoords.fromString(providerStr);
} catch (Exception e) {
throw new IllegalStateException("Failed to process configuration of " + config.getId()
+ " registry: failed to cast " + providerValue + " to String", e);
}
final File providerJar;
try {
providerJar = artifactResolver.resolve(new DefaultArtifact(providerArtifact.getGroupId(),
providerArtifact.getArtifactId(), providerArtifact.getClassifier(),
providerArtifact.getType(), providerArtifact.getVersion())).getArtifact().getFile();
} catch (BootstrapMavenException e) {
throw new IllegalStateException(
"Failed to resolve the registry client factory provider artifact " + providerArtifact, e);
}
log.debug("Loading registry client factory for %s from %s", config.getId(), providerArtifact);
final URL url;
try {
url = providerJar.toURI().toURL();
} catch (MalformedURLException e) {
throw new IllegalStateException("Failed to translate " + providerJar + " to URL", e);
}View on GitHub (pinned to e1c734241f)
Solutions
- Quote the value in YAML/properties so it is treated as a String (e.g. "1.0.0")
- Provide full Maven coordinates groupId:artifactId:classifier:type:version for the client factory jar
- Verify the coordinate string parses with ArtifactCoords.fromString locally
- Point the config at the correct registry client factory artifact
Example fix
// before (YAML)
registries:
my-registry:
client-factory: 1.0.0
// after
registries:
my-registry:
client-factory: "io.quarkus.registry:quarkus-registry-client-factory:1.0.0" Defensive patterns
Strategy: type-guard
Validate before calling
Object providerValue = ...;
// Validate it is a String and parses as artifact coordinates before configuring
if (providerValue instanceof String s) {
ArtifactCoords.fromString(s); // throws if invalid; catch and report early
} else {
throw new IllegalArgumentException("client-factory must be a string of G:A:C:T:V coordinates");
} Type guard
boolean isValidProvider(Object v) {
if (!(v instanceof String s)) return false;
try { ArtifactCoords.fromString(s); return true; } catch (Exception e) { return false; }
} Try / catch
try {
resolver.build();
} catch (IllegalStateException e) {
if (e.getMessage().contains("failed to cast") || e.getMessage().contains("Failed to process configuration of")) {
// quote the YAML value or supply full G:A:C:T:V coordinates per the message
}
throw e;
} Prevention
- Quote numeric-looking values in YAML/properties configs so they parse as strings
- Provide full groupId:artifactId:classifier:type:version coordinates
- Validate registry client-factory config at startup with ArtifactCoords.fromString
When it happens
Trigger: Configuring a registry's client-factory provider with a non-String object (e.g. a number/map in YAML/properties) or with a string that is not valid G:A[:C][:T]:V coordinates, causing the cast or ArtifactCoords.fromString to throw.
Common situations: YAML config where a value like 1.0.0 is parsed as a float, so the (String) cast fails; coordinate string missing the version; using a path or URL instead of Maven coordinates.
Related errors
- Malformed URL: + url
- Couldn't resolve the Quarkus platform catalog since none of
- Unable to find the TLS configuration for name ${name}.
- Failed to translate ${provider} to URL
- The following registries were configured as exclusive provid
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/1dd08db905188da9.
Report an issue: GitHub.