quarkusio/quarkus · error · RuntimeException

Failed to deserialize extension catalog ${platformJson}

Error message

Failed to deserialize extension catalog ${platformJson}

What it means

Thrown by ToolsUtils.resolvePlatformDescriptorDirectly after the platform JSON file was downloaded but ExtensionCatalog.fromFile fails to parse it. This means the artifact resolved but its content is not a valid extension catalog JSON (corrupt file, wrong artifact, or incompatible schema).

Source

Thrown at independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/tools/ToolsUtils.java:164

                } catch (Exception e2) {
                }
            }
            if (platformJson == null) {
                final StringBuilder sb = new StringBuilder();
                sb.append("Failed to resolve extension catalog for ");
                sb.append(PlatformArtifacts.ensureBomArtifact(ArtifactCoords.of(catalogCoords.getGroupId(),
                        catalogCoords.getArtifactId(), catalogCoords.getClassifier(), catalogCoords.getExtension(),
                        catalogCoords.getVersion())).toCompactCoords());
                sb.append(
                        ". Make sure the groupId, artifactId and version are spelled correctly and the relevant Maven repositories are configured.");
                throw new RuntimeException(sb.toString(), e);
            }
        }
        ExtensionCatalog catalog;
        try {
            catalog = ExtensionCatalog.fromFile(platformJson);
        } catch (IOException e) {
            throw new RuntimeException("Failed to deserialize extension catalog " + platformJson, e);
        }
        Map<String, Object> md = catalog.getMetadata();
        if (md != null) {
            Object o = md.get("platform-release");
            if (o instanceof Map) {
                Object members = ((Map<?, ?>) o).get("members");
                if (members instanceof Collection) {
                    final Collection<?> memberList = (Collection<?>) members;
                    final List<ExtensionCatalog> catalogs = new ArrayList<>(memberList.size());

                    int memberIndex = 0;
                    for (Object m : memberList) {
                        if (!(m instanceof String)) {
                            continue;
                        }
                        final ExtensionCatalog memberCatalog;
                        if (catalog.getId().equals(m)) {
                            memberCatalog = catalog;

View on GitHub (pinned to e1c734241f)

Solutions

  1. Delete the corresponding artifact from ~/.m2/repository to clear a corrupted cache and re-resolve
  2. Confirm the resolved artifact is the platform descriptor JSON (type 'json'), not the BOM POM
  3. Align the devtools/registry-client version with the platform version so the catalog schema matches
  4. Inspect the target file in the local repository to verify it is valid JSON

Example fix

// before
resolvePlatformDescriptorDirectly("io.quarkus.platform:quarkus-bom:pom:3.15.1") // resolves POM, not JSON
// after
resolvePlatformDescriptorDirectly("io.quarkus.platform:quarkus-bom:json:3.15.1")
Defensive patterns

Strategy: try-catch

Validate before calling

// Verify the resolved file is valid JSON before deserializing
Path json = ...;
if (!Files.isRegularFile(json) || Files.size(json) == 0) throw new IllegalStateException("Empty/corrupt catalog: " + json);
new ObjectMapper().readTree(json.toFile()); // throws if not valid JSON

Try / catch

try {
    resolvePlatformDescriptorDirectly(coords);
} catch (RuntimeException e) {
    if (e.getMessage().startsWith("Failed to deserialize extension catalog")) {
        // purge ~/.m2 cache entry for the artifact and align tool/platform versions, then retry
    }
    throw e;
}

Prevention

When it happens

Trigger: ExtensionCatalog.fromFile(platformJson) throws IOException — the resolved path points to a file that is not deserializable as an ExtensionCatalog (e.g. a POM was resolved instead of the JSON descriptor, or the JSON schema version differs from the reader).

Common situations: Pointing at a BOM POM instead of the JSON descriptor artifact; a partially-downloaded/corrupted cached artifact in the local repo; mixing registry client and platform versions with incompatible catalog schemas.

Related errors


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