quarkusio/quarkus · error · IllegalStateException
Failed to translate ${providerJar} to URL
Error message
Failed to translate ${providerJar} to URL What it means
Thrown as IllegalStateException when the resolved provider jar's File cannot be converted to a URL via providerJar.toURI().toURL(), i.e. a MalformedURLException. In practice this is nearly impossible for a real resolved jar file, but guards against unexpected file paths.
Source
Thrown at independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/ExtensionCatalogResolver.java:168
} 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);
}
return loadFromUrl(url);
}
private RegistryClientFactory loadFromUrl(final URL url) {
try {
// here we use the classloader that loaded RegistryClientFactoryProvider instead of the TCCL
// because, apparently, the TCCL doesn't work for this use-case from Maven plugins with extensions enabled
final ClassLoader providerCl = new URLClassLoader(new URL[] { url },
RegistryClientFactoryProvider.class.getClassLoader());
final Iterator<RegistryClientFactoryProvider> i = ServiceLoader
.load(RegistryClientFactoryProvider.class, providerCl).iterator();
if (!i.hasNext()) {
throw new Exception("Failed to locate an implementation of " + RegistryClientFactoryProvider.class.getName()
+ " service provider");
}
final RegistryClientFactoryProvider provider = i.next();
if (i.hasNext()) {View on GitHub (pinned to e1c734241f)
Solutions
- Inspect the resolved jar path printed in the message for illegal characters or malformed syntax
- Ensure the local Maven repository location in settings.xml is a valid plain directory path
- Re-run resolution; if persistent, clear the corrupted local-repo entry so the file is re-downloaded
Defensive patterns
Strategy: try-catch
Validate before calling
File jar = ...; URI uri = jar.toURI(); // ensure path is absolute and normal
Try / catch
try { resolver.getClientFactory(); } catch (IllegalStateException e) { log.error("Provider jar path: " + e.getMessage(), e); throw e; } Prevention
- Keep the local Maven repository path simple (ASCII, no special characters)
- Use an absolute path for alternate local repositories
- Avoid symlinks with exotic targets for the local repo
When it happens
Trigger: loadFromArtifact in ExtensionCatalogResolver, immediately after a successful artifact resolution, when providerJar.toURI().toURL() throws MalformedURLException.
Common situations: Corrupt or unusual local repository path (illegal URL characters, malformed filesystem path); platform-specific path issues.
Related errors
- Specifying a stream (--stream) requires the registry client
- Malformed URL: + url
- Specifying a stream requires the Quarkus extension registry
- This goal requires a Quarkus extension registry client to be
- Invalid external URL, can not be empty
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/eb6ab58704b00fee.
Report an issue: GitHub.