{"record":{"id":"60cc7afd1a041aaf","repo":"quarkusio/quarkus","slug":"unable-to-parse-resolvedmodelpath","errorCode":null,"errorMessage":"Unable to parse: ${resolvedModelPath}","messagePattern":"Unable to parse: (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"core/processor/src/main/java/io/quarkus/annotation/processor/documentation/config/merger/ModelMerger.java","lineNumber":119,"sourceCode":"\n                        continue;\n                    }\n\n                    Map<ConfigRootKey, ConfigRoot> extensionConfigRoots = configRoots.computeIfAbsent(\n                            normalizeExtension(configRoot.getExtension(), mergeCommonOrInternalExtensions),\n                            e -> new TreeMap<>());\n\n                    ConfigRootKey configRootKey = getConfigRootKey(javadocRepository, configRoot);\n                    ConfigRoot existingConfigRoot = extensionConfigRoots.get(configRootKey);\n\n                    if (existingConfigRoot == null) {\n                        extensionConfigRoots.put(configRootKey, configRoot);\n                    } else {\n                        existingConfigRoot.merge(configRoot);\n                    }\n                }\n            } catch (IOException e) {\n                throw new IllegalStateException(\"Unable to parse: \" + resolvedModelPath, e);\n            }\n        }\n\n        // note that the configRoots are now sorted by extension name\n        configRoots = retainBestExtensionKey(configRoots);\n\n        for (Entry<Extension, Map<ConfigRootKey, ConfigRoot>> extensionConfigRootsEntry : configRoots.entrySet()) {\n            List<ConfigSection> extensionGeneratedConfigSections = generatedConfigSections\n                    .computeIfAbsent(extensionConfigRootsEntry.getKey(), e -> new ArrayList<>());\n\n            for (ConfigRoot configRoot : extensionConfigRootsEntry.getValue().values()) {\n                collectGeneratedConfigSections(extensionGeneratedConfigSections, configRoot);\n            }\n        }\n\n        return new MergedModel(configRoots, configRootsInSpecificFile, generatedConfigSections);\n    }\n","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/processor/src/main/java/io/quarkus/annotation/processor/documentation/config/merger/ModelMerger.java#L101-L137","documentation":"The Quarkus config documentation annotation processor (ConfigDocAnnotationProcessor) failed to read or parse a serialized config documentation model JSON file while merging per-extension models into one. mergeModel walks resolvedModelPath files, deserializes each into a ConfigRoot, and merges them; any IOException during parsing is wrapped in this IllegalStateException. It almost always means an existing quarkus-config-docs model JSON on the processing path is corrupt, stale, or unreadable.","triggerScenarios":"Running the annotation processor when the file at resolvedModelPath (an accumulated quarkus-config-docs model JSON from a previous round/dependency jar) exists but cannot be read or deserialized: truncated/corrupt JSON, unreadable file permissions, invalid encoding, or a model produced by an incompatible processor version.","commonSituations":"Incremental builds after a Quarkus upgrade left an old-format model JSON in target/ or a dependency jar; interrupted builds leaving partially written JSON; read-only or permission-denied output directories in CI; classpath pollution where a stale quarkus-config-docs model from another module is picked up.","solutions":["Run a clean build (mvn clean install) to remove stale/corrupt model JSON files.","Check the file at the path in the message: verify it is valid JSON, readable, and not truncated (0 bytes or cut off).","Delete the offending model JSON from the dependency jar or target directory and rebuild.","Ensure all modules are built with the same Quarkus version so the model format matches.","If caused by the processor itself failing to write then read its file, report with the full stack trace including the wrapped IOException."],"exampleFix":"// before: stale corrupt model in target reused across builds\n$ mvn install\nIllegalStateException: Unable to parse: target/classes/quarkus-config-docs/model.json\n\n// after: force regeneration of the model file\n$ mvn clean install","handlingStrategy":"validation","validationCode":"// before building, verify model files are valid JSON\nPath model = Path.of(\"target/classes/quarkus-config-docs/model.json\");\nif (Files.exists(model)) {\n    try (var in = Files.newInputStream(model)) {\n        new ObjectMapper().readTree(in); // throws if corrupt\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    mergeModel(...);\n} catch (IllegalStateException e) {\n    if (e.getMessage().startsWith(\"Unable to parse:\")) {\n        Files.deleteIfExists(modelPath); // regenerate stale model\n        mergeModel(...);\n    } else throw e;\n}","preventionTips":["Run mvn clean after Quarkus version upgrades to purge stale model JSON.","Never commit generated quarkus-config-docs model files to source control.","Keep all modules in a multi-module build on the same Quarkus version.","Check CI disk/permission health for target directories."],"tags":["quarkus","annotation-processing","json","build","config-docs"],"backgroundTag":"json-parse-error","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"}