{"record":{"id":"ee3fbea109e69059","repo":"quarkusio/quarkus","slug":"failed-to-deserialize-extension-catalog-platform","errorCode":null,"errorMessage":"Failed to deserialize extension catalog ${platformJson}","messagePattern":"Failed to deserialize extension catalog (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/tools/ToolsUtils.java","lineNumber":164,"sourceCode":"                } catch (Exception e2) {\n                }\n            }\n            if (platformJson == null) {\n                final StringBuilder sb = new StringBuilder();\n                sb.append(\"Failed to resolve extension catalog for \");\n                sb.append(PlatformArtifacts.ensureBomArtifact(ArtifactCoords.of(catalogCoords.getGroupId(),\n                        catalogCoords.getArtifactId(), catalogCoords.getClassifier(), catalogCoords.getExtension(),\n                        catalogCoords.getVersion())).toCompactCoords());\n                sb.append(\n                        \". Make sure the groupId, artifactId and version are spelled correctly and the relevant Maven repositories are configured.\");\n                throw new RuntimeException(sb.toString(), e);\n            }\n        }\n        ExtensionCatalog catalog;\n        try {\n            catalog = ExtensionCatalog.fromFile(platformJson);\n        } catch (IOException e) {\n            throw new RuntimeException(\"Failed to deserialize extension catalog \" + platformJson, e);\n        }\n        Map<String, Object> md = catalog.getMetadata();\n        if (md != null) {\n            Object o = md.get(\"platform-release\");\n            if (o instanceof Map) {\n                Object members = ((Map<?, ?>) o).get(\"members\");\n                if (members instanceof Collection) {\n                    final Collection<?> memberList = (Collection<?>) members;\n                    final List<ExtensionCatalog> catalogs = new ArrayList<>(memberList.size());\n\n                    int memberIndex = 0;\n                    for (Object m : memberList) {\n                        if (!(m instanceof String)) {\n                            continue;\n                        }\n                        final ExtensionCatalog memberCatalog;\n                        if (catalog.getId().equals(m)) {\n                            memberCatalog = catalog;","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/tools/ToolsUtils.java#L146-L182","documentation":"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).","triggerScenarios":"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).","commonSituations":"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.","solutions":["Delete the corresponding artifact from ~/.m2/repository to clear a corrupted cache and re-resolve","Confirm the resolved artifact is the platform descriptor JSON (type 'json'), not the BOM POM","Align the devtools/registry-client version with the platform version so the catalog schema matches","Inspect the target file in the local repository to verify it is valid JSON"],"exampleFix":"// before\nresolvePlatformDescriptorDirectly(\"io.quarkus.platform:quarkus-bom:pom:3.15.1\") // resolves POM, not JSON\n// after\nresolvePlatformDescriptorDirectly(\"io.quarkus.platform:quarkus-bom:json:3.15.1\")","handlingStrategy":"try-catch","validationCode":"// Verify the resolved file is valid JSON before deserializing\nPath json = ...;\nif (!Files.isRegularFile(json) || Files.size(json) == 0) throw new IllegalStateException(\"Empty/corrupt catalog: \" + json);\nnew ObjectMapper().readTree(json.toFile()); // throws if not valid JSON","typeGuard":null,"tryCatchPattern":"try {\n    resolvePlatformDescriptorDirectly(coords);\n} catch (RuntimeException e) {\n    if (e.getMessage().startsWith(\"Failed to deserialize extension catalog\")) {\n        // purge ~/.m2 cache entry for the artifact and align tool/platform versions, then retry\n    }\n    throw e;\n}","preventionTips":["Resolve the 'json' typed descriptor, not the POM","Keep devtools and platform versions aligned","Clear local repo cache entries when switching between snapshot versions"],"tags":["json","deserialization","maven"],"backgroundTag":"catalog-deserialization-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}