{"record":{"id":"06c9553e1b51d2a4","repo":"quarkusio/quarkus","slug":"failed-to-deserialize-platform-descriptor-json","errorCode":null,"errorMessage":"Failed to deserialize platform descriptor ${json}","messagePattern":"Failed to deserialize platform descriptor (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/tools/ToolsUtils.java","lineNumber":246,"sourceCode":"        return mergePlatforms(platforms, new BootstrapAppModelResolver(artifactResolver));\n    }\n\n    public static ExtensionCatalog mergePlatforms(List<ArtifactCoords> platforms, AppModelResolver artifactResolver) {\n        // TODO remove this method once we have the registry service available\n        List<ExtensionCatalog> catalogs = new ArrayList<>(platforms.size());\n        for (ArtifactCoords platform : platforms) {\n            final Path json;\n            try {\n                json = artifactResolver.resolve(ArtifactCoords.of(platform.getGroupId(), platform.getArtifactId(),\n                        platform.getClassifier(), platform.getType(), platform.getVersion())).getResolvedPaths()\n                        .getSinglePath();\n            } catch (Exception e) {\n                throw new RuntimeException(\"Failed to resolve platform descriptor \" + platform, e);\n            }\n            try {\n                catalogs.add(ExtensionCatalog.fromFile(json));\n            } catch (IOException e) {\n                throw new RuntimeException(\"Failed to deserialize platform descriptor \" + json, e);\n            }\n        }\n        return CatalogMergeUtility.merge(catalogs);\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    public static Properties readQuarkusProperties(ExtensionCatalog catalog) {\n        Map<Object, Object> map = (Map<Object, Object>) catalog.getMetadata().getOrDefault(\"project\", Collections.emptyMap());\n        map = (Map<Object, Object>) map.getOrDefault(\"properties\", Collections.emptyMap());\n        final Properties properties = new Properties();\n        map.entrySet().forEach(\n                e -> properties.setProperty(e.getKey().toString(), e.getValue() == null ? null : e.getValue().toString()));\n        return properties;\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    public static Map<String, Object> readProjectData(ExtensionCatalog catalog) {\n        Map<Object, Object> map = (Map<Object, Object>) catalog.getMetadata().getOrDefault(\"project\", Map.of());","sourceCodeStart":228,"sourceCodeEnd":264,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/tools/ToolsUtils.java#L228-L264","documentation":"Thrown by ToolsUtils.mergePlatforms when a platform descriptor was downloaded successfully but ExtensionCatalog.fromFile(json) cannot deserialize the file. The cause chain contains the Jackson/IO error explaining why the JSON is invalid or incompatible.","triggerScenarios":"ExtensionCatalog.fromFile throws IOException on the resolved platform JSON — malformed JSON, truncated download, wrong artifact type resolved, or catalog schema mismatch with the reading library version.","commonSituations":"Manually edited or corrupted files in the local Maven cache; resolving the POM rather than the 'json' typed descriptor; version skew between platform and devtools tools.","solutions":["Remove the cached artifact from ~/.m2/repository and re-run to get a fresh copy","Verify the resolved file is the platform descriptor JSON, not a POM","Upgrade/downgrade the devtools-common/registry-client version to match the platform release","Open the JSON and validate it parses (e.g. jq) to confirm corruption"],"exampleFix":"// before\nrm nothing; reuse corrupted cache\n// after\ncd ~/.m2/repository/io/quarkus/platform/quarkus-bom && rm -rf <bad-version>  # then re-run mergePlatforms","handlingStrategy":"try-catch","validationCode":"Path json = ...;\nif (!Files.isRegularFile(json)) throw new IllegalStateException(\"Not a file: \" + json);\nnew ObjectMapper().readTree(Files.newInputStream(json)); // pre-validate JSON parseability","typeGuard":null,"tryCatchPattern":"try {\n    mergePlatforms(platforms);\n} catch (RuntimeException e) {\n    if (e.getMessage().startsWith(\"Failed to deserialize platform descriptor\")) {\n        // delete the cached file named in the message from ~/.m2 and retry\n    }\n    throw e;\n}","preventionTips":["Purge suspicious artifacts from the local Maven cache after aborted downloads","Verify descriptor artifacts are of type 'json'","Match the reading library version to the platform release"],"tags":["json","deserialization","platform"],"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-14T00:17:10.932Z"}