{"record":{"id":"f45e9a120e371a1c","repo":"quarkusio/quarkus","slug":"failed-to-load-non-platform-extension-catalog-from","errorCode":null,"errorMessage":"Failed to load non-platform extension catalog from ${jsonFile}","messagePattern":"Failed to load non-platform extension catalog from (.+?)","errorType":"exception","errorClass":"RegistryResolutionException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/client/maven/MavenNonPlatformExtensionsResolver.java","lineNumber":49,"sourceCode":"    public ExtensionCatalog.Mutable resolveNonPlatformExtensions(String quarkusVersion)\n            throws RegistryResolutionException {\n        final ArtifactCoords baseCoords = config.getArtifact();\n        final Artifact catalogArtifact = new DefaultArtifact(baseCoords.getGroupId(),\n                baseCoords.getArtifactId(), quarkusVersion, baseCoords.getType(), baseCoords.getVersion());\n        log.debug(\"Resolving non-platform extension catalog %s\", catalogArtifact);\n\n        final Path jsonFile;\n        try {\n            jsonFile = artifactResolver.resolve(catalogArtifact);\n        } catch (Exception e) {\n            log.debug(\"Failed to resolve non-platform extension catalog %s\", catalogArtifact);\n            return null;\n        }\n\n        try {\n            return ExtensionCatalog.mutableFromFile(jsonFile);\n        } catch (Exception e) {\n            throw new RegistryResolutionException(\"Failed to load non-platform extension catalog from \" + jsonFile, e);\n        }\n    }\n}\n","sourceCodeStart":31,"sourceCodeEnd":53,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/client/maven/MavenNonPlatformExtensionsResolver.java#L31-L53","documentation":"MavenNonPlatformExtensionsResolver resolves the non-platform extensions catalog JSON from a local Maven repository file and parses it with ExtensionCatalog.mutableFromFile(). If parsing/loading throws any Exception, it is wrapped in RegistryResolutionException with the file path and the original cause attached. This distinguishes 'file downloaded but unreadable/unparseable' from 'artifact not found' (which returns null).","triggerScenarios":"resolveNonPlatformExtensions() finds the downloaded non-platform catalog artifact for a given Quarkus core version, but ExtensionCatalog.mutableFromFile(jsonFile) fails — corrupt/truncated JSON, wrong artifact content (HTML error page saved as JSON), or Jackson mapping incompatibility.","commonSituations":"Corrupted local Maven cache (~/.m2) entry; a proxy or mirror returning an HTML error page stored as the artifact; a registry extension catalog JSON not matching the expected schema version.","solutions":["Inspect the file named in the message and validate its JSON (jq/cat the beginning).","Delete the corrupted artifact from the local Maven repo cache and re-resolve to re-download.","Check the intermediate cause (getCause()) to identify the exact parse error.","Verify the mirror/proxy is not substituting error pages for the artifact.","Call clearRegistryCache() and retry the resolution."],"exampleFix":"// before\nrm -rf ~/.m2/repository/io/quarkus/registry  // then re-run resolution\n// after — or guard in code\ntry {\n    catalog = resolver.resolveNonPlatformExtensions(version);\n} catch (RegistryResolutionException e) {\n    resolver.clearRegistryCache();\n    catalog = resolver.resolveNonPlatformExtensions(version); // re-download\n}","handlingStrategy":"try-catch","validationCode":"// Java\nPath jsonFile = ...; // resolved catalog path\nif (jsonFile != null && Files.exists(jsonFile)) {\n    try (var reader = Files.newBufferedReader(jsonFile)) {\n        if (reader.read() != '{') throw new IllegalStateException(\"Not JSON: \" + jsonFile);\n    }\n}","typeGuard":null,"tryCatchPattern":"// Java\ntry {\n    catalog = resolver.resolveNonPlatformExtensions(coreVersion);\n} catch (RegistryResolutionException e) {\n    if (e.getMessage().startsWith(\"Failed to load non-platform extension catalog\")) {\n        resolver.clearRegistryCache();            // purge corrupt artifact\n        catalog = resolver.resolveNonPlatformExtensions(coreVersion); // re-download\n    } else throw e;\n}","preventionTips":["Check getCause() of RegistryResolutionException for the exact Jackson error.","Purge ~/.m2 entries for io.quarkus.registry when cache corruption is suspected.","Ensure mirrors return artifact bytes, not HTML error pages.","Validate registry catalog JSON schema compatibility with your client version."],"tags":["maven","json","corrupt-cache","parsing"],"backgroundTag":"catalog-json-parse-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"}