quarkusio/quarkus · error · IllegalArgumentException

${key} isn't found in the extension map

Error message

${key} isn't found in the extension map

What it means

ExtensionMapBuilder.get(ArtifactKey) looks up an extension update entry keyed by artifactId. When the bucket for the artifactId holds multiple entries (same artifactId, different groupId), it disambiguates by exact key match against currentDep or the recommended dependency; if none matches the requested full key it throws IllegalArgumentException. In practice this signals a key mismatch within an artifactId collision.

Source

Thrown at independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/update/ExtensionMapBuilder.java:46

        list.add(e);
    }

    public ExtensionUpdateInfoBuilder get(ArtifactKey key) {
        final List<ExtensionUpdateInfoBuilder> list = extensionInfo.get(key.getArtifactId());
        if (list == null || list.isEmpty()) {
            return null;
        }
        if (list.size() == 1) {
            return list.get(0);
        }
        for (ExtensionUpdateInfoBuilder e : list) {
            final TopExtensionDependency recommendedDep = e.resolveRecommendedDep();
            if (e.currentDep.getKey().equals(key)
                    || recommendedDep != null && recommendedDep.getKey().equals(key)) {
                return e;
            }
        }
        throw new IllegalArgumentException(key + " isn't found in the extension map");
    }

    public Collection<ExtensionUpdateInfoBuilder> values() {
        return list;
    }

    public int size() {
        return extensionInfo.size();
    }

    public boolean isEmpty() {
        return extensionInfo.isEmpty();
    }

    public static final class ExtensionUpdateInfoBuilder {
        private final TopExtensionDependency currentDep;
        private Extension recommendedMetadata;
        private TopExtensionDependency recommendedDep;

View on GitHub (pinned to e1c734241f)

Solutions

  1. Use the exact current groupId:artifactId of the installed extension in the lookup key (check pom.xml dependencies)
  2. If the extension was relocated, update the dependency in the project to the new groupId so currentDep matches the recommended key
  3. Check for duplicate extensions with the same artifactId in your dependency tree (mvn dependency:tree) and remove the stale one
  4. Since this is internal devtools code triggered by resolveRecommendedState, ensure the registries' catalogs aren't returning mismatched keys (refresh registry cache)

Example fix

// before: lookup with legacy groupId
ArtifactKey key = ArtifactKey.fromString("io.quarkus:quarkus-resteasy");
builder.get(key); // IllegalArgumentException if installed as new groupId
// after
ArtifactKey key = ArtifactKey.fromString("io.quarkus.ext:quarkus-resteasy"); // groupId matching the installed dependency
builder.get(key);
Defensive patterns

Strategy: validation

Validate before calling

// before lookup
ArtifactKey fullKey = dep.getKey();
boolean exists = extensionMap.values().stream()
    .anyMatch(e -> e.getCurrentDep().getKey().equals(fullKey)
        || e.resolveRecommendedDep().getKey().equals(fullKey));
if (!exists) throw new IllegalStateException("Extension not registered: " + fullKey);

Prevention

When it happens

Trigger: Calling ProjectUpdateInfos.resolveRecommendedState()/resolveExtensionsUpdateInfo() flows that look up an extension by ArtifactKey when two registered extensions share an artifactId but differ in groupId, and the queried key matches neither current nor recommended dependency key — typically after an extension was relocated/renamed to a different groupId.

Common situations: Projects referencing an extension under an old groupId after Quarkus relocated the artifact, custom forks of core extensions shadowing original artifactIds, mixing extensions from different registries with colliding artifactIds.

Related errors


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