quarkusio/quarkus · error · IllegalStateException

Failed to locate among the configured registries

Error message

Failed to locate ${registryId} among the configured registries: ${registryIds}

What it means

Thrown as IllegalStateException by getRegistryExtensionResolver when a registry id passed to a per-registry catalog lookup does not match any of the registries configured in the resolver. The message lists all configured registry ids to help identify the mismatch.

Solutions

  1. Compare the requested registryId with the ids listed in the error message
  2. Fix the registry id in the calling code/config (including quarkus.registry.<id>.id settings in settings.xml)
  3. Ensure the registry is enabled and not excluded from the registry client configuration

Example fix

// before
resolver.resolvePlatformCatalogFromRegistry("registry.quarkus.io", bom);
// after (id matching the configured registry)
resolver.resolvePlatformCatalogFromRegistry("registry.quarkus.redhat.com", bom);
Defensive patterns

Strategy: validation

Validate before calling

boolean known = resolver.getRegistries().stream().anyMatch(r -> r.getId().equals(registryId));
if (!known) throw new IllegalArgumentException("Unknown registry: " + registryId);

Try / catch

try { resolver.resolvePlatformCatalogFromRegistry(registryId, bom); } catch (IllegalStateException e) { log.error("Registry id mismatch: " + e.getMessage()); throw e; }

Prevention

When it happens

Trigger: resolvePlatformCatalogFromRegistry (or similar) called with a registryId that is absent from ExtensionCatalogResolver.this.registries after configuration processing.

Common situations: Typo in registry id in tooling/API call; registry id renamed in the client config; registry filtered out (disabled) so it is no longer in the configured list; stale scripts referencing old registry names.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/9741a4c6ad9dd837. Report an issue: GitHub.

Appendix: source

Thrown at independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/ExtensionCatalogResolver.java:320

        return getRegistryExtensionResolver(registryId).resolvePlatformCatalog();
    }

    public PlatformCatalog resolvePlatformCatalogFromRegistry(String registryId, String quarkusVersion)
            throws RegistryResolutionException {
        return quarkusVersion == null ? resolvePlatformCatalogFromRegistry(registryId)
                : getRegistryExtensionResolver(registryId).resolvePlatformCatalog(quarkusVersion);
    }

    private RegistryExtensionResolver getRegistryExtensionResolver(String registryId) {
        for (var registryExtResolver : registries) {
            if (registryExtResolver.getId().equals(registryId)) {
                return registryExtResolver;
            }
        }
        final StringBuilder buf = new StringBuilder();
        buf.append("Failed to locate ").append(registryId).append(" among the configured registries:");
        registries.forEach(r -> buf.append(" ").append(r.getId()));
        throw new IllegalStateException(buf.toString());
    }

    private class ExtensionCatalogBuilder {
        private final List<ExtensionCatalog.Mutable> catalogs = new ArrayList<>();
        final Map<String, List<RegistryExtensionResolver>> registriesByQuarkusCore = new HashMap<>();
        private final Map<String, Integer> compatibilityCodes = new LinkedHashMap<>();
        final List<String> upstreamQuarkusVersions = new ArrayList<>(1);
        final PlatformPreferenceIndex platformPreferenceIndex = new PlatformPreferenceIndex();
        final List<String> registryPreferenceIndex = new ArrayList<>(2);

        int getRegistryPreferenceIndex(String registryId) {
            for (int i = 0; i < registryPreferenceIndex.size(); ++i) {
                if (registryPreferenceIndex.get(i).equals(registryId)) {
                    return i;
                }
            }
            registryPreferenceIndex.add(registryId);
            return registryPreferenceIndex.size() - 1;

View on GitHub (pinned to e1c734241f)