{"record":{"id":"fb34db1f33a80a34","repo":"quarkusio/quarkus","slug":"failed-to-load-pom-from","errorCode":null,"errorMessage":"Failed to load POM from ","messagePattern":"Failed to load POM from ","errorType":"exception","errorClass":"UncheckedIOException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/WorkspaceLoader.java","lineNumber":70,"sourceCode":"    }\n\n    static Path getFsRootDir() {\n        return Path.of(\"/\");\n    }\n\n    static Model readModel(Path pom) {\n        try {\n            final Model model = ModelUtils.readModel(pom);\n            model.setPomFile(pom.toFile());\n            return model;\n        } catch (NoSuchFileException e) {\n            // some projects may be missing pom.xml relying on Maven extensions (e.g. tycho-maven-plugin) to build them,\n            // which we don't support in this workspace loader\n            log.warn(\"Module(s) under \" + pom.getParent() + \" will be handled as thirdparty dependencies because \" + pom\n                    + \" does not exist\");\n            return MISSING_MODEL;\n        } catch (IOException e) {\n            throw new UncheckedIOException(\"Failed to load POM from \" + pom, e);\n        }\n    }\n\n    private static Path locateCurrentProjectPom(Path path) throws BootstrapMavenException {\n        Path p = path;\n        while (p != null) {\n            final Path pom = p.resolve(POM_XML);\n            if (Files.exists(pom)) {\n                return pom;\n            }\n            p = p.getParent();\n        }\n        throw new BootstrapMavenException(\"Failed to locate project pom.xml for \" + path);\n    }\n\n    private final Deque<WorkspaceModulePom> loadQueue = new ConcurrentLinkedDeque<>();\n    // Map key is the normalized absolute Path to the module directory\n    private final Map<Path, WorkspaceModulePom> knownModules = new ConcurrentHashMap<>();","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/WorkspaceLoader.java#L52-L88","documentation":"WorkspaceLoader.readModel(Path pom) wraps ModelUtils.readModel failures. A NoSuchFileException is tolerated (module treated as thirdparty), but any other IOException while reading a POM is rethrown as UncheckedIOException(\"Failed to load POM from \" + pom). It indicates the pom.xml exists but could not be read or parsed.","triggerScenarios":"WorkspaceLoader loading a queued WorkspaceModulePom whose pom.xml throws a non-NoSuchFile IOException: permission denied, an I/O error, or a parse failure (malformed XML) surfaced as IOException from ModelUtils.readModel.","commonSituations":"pom.xml unreadable due to file permissions or being locked by another process on Windows; malformed XML in a multi-module build module; filesystem errors (network drive dropped, disk full); symlink loops.","solutions":["Fix the underlying cause shown in the wrapped exception's cause (parse error vs permission vs I/O) — inspect e.getCause().","Check file permissions/ownership of the pom.xml and that no other process holds it locked.","Validate the module's pom.xml with `mvn validate` or `xmllint --noout` and fix any XML errors.","Check filesystem health/mounts if the project lives on a network or removable drive."],"exampleFix":"// diagnosing\ntry {\n    loader.load();\n} catch (UncheckedIOException e) {\n    e.getCause().printStackTrace(); // e.g. XmlPullParserException wrapped in IOException\n}\n// typical fix: repair malformed XML in the reported module pom","handlingStrategy":"try-catch","validationCode":"static void requireReadablePom(Path pom) throws IOException {\n    if (!Files.isRegularFile(pom)) throw new NoSuchFileException(pom.toString());\n    if (!Files.isReadable(pom)) throw new IOException(\"Not readable: \" + pom);\n}","typeGuard":"static boolean isReadablePom(Path pom) {\n    return pom != null && Files.isRegularFile(pom) && Files.isReadable(pom);\n}","tryCatchPattern":"try {\n    loader.load();\n} catch (UncheckedIOException e) {\n    Throwable cause = e.getCause();\n    log.error(\"Failed to load POM: \" + cause.getMessage() + \" (check permissions/XML validity)\");\n}","preventionTips":["Inspect e.getCause() to distinguish parse errors from permission/I-O errors.","Verify pom.xml permissions and that no other process locks the file.","Avoid project directories on unreliable network mounts.","Validate each module's pom.xml in multi-module builds before bootstrapping."],"tags":["maven","io","pom","quarkus-bootstrap"],"backgroundTag":"malformed-xml","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"}