{"record":{"id":"34edfd9e44dd3b59","repo":"quarkusio/quarkus","slug":"failed-to-read-34edfd","errorCode":null,"errorMessage":"Failed to read ","messagePattern":"Failed to read ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/DefaultEffectiveModelResolver.java","lineNumber":84,"sourceCode":"                return project.getEffectiveModel();\n            }\n        }\n\n        final File pomFile;\n        final ArtifactResult pomResult;\n        try {\n            pomResult = resolver.resolve(new DefaultArtifact(coords.getGroupId(), coords.getArtifactId(),\n                    coords.getClassifier(), coords.getType(), coords.getVersion()), repos);\n            pomFile = pomResult.getArtifact().getFile();\n        } catch (BootstrapMavenException e) {\n            throw new RuntimeException(\"Failed to resolve \" + coords.toCompactCoords(), e);\n        }\n\n        final Model rawModel;\n        try {\n            rawModel = ModelUtils.readModel(pomFile.toPath());\n        } catch (IOException e1) {\n            throw new RuntimeException(\"Failed to read \" + pomFile, e1);\n        }\n\n        final ModelResolver modelResolver;\n        try {\n            modelResolver = BootstrapModelResolver.newInstance(resolver.getMavenContext(), null);\n        } catch (BootstrapMavenException e) {\n            throw new RuntimeException(\"Failed to initialize model resolver\", e);\n        }\n\n        // override the relative path to the parent in case it's in the local Maven repo\n        Parent parent = rawModel.getParent();\n        if (parent != null) {\n            final Artifact parentPom = new DefaultArtifact(parent.getGroupId(), parent.getArtifactId(),\n                    ArtifactCoords.TYPE_POM, parent.getVersion());\n            final ArtifactResult parentResult;\n            final Path parentPomPath;\n            try {\n                parentResult = resolver.resolve(parentPom, repos);","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/DefaultEffectiveModelResolver.java#L66-L102","documentation":"Generic failure guard in DefaultEffectiveModelResolver.resolveEffectiveModel: an earlier 'Failed to resolve <coords>' exception is being re-thrown as a RuntimeException while trying to read the resolved pom and build the effective model for the given coordinates. The real cause is the nested BootstrapMavenException identifying which artifact pom could not be fetched.","triggerScenarios":"resolveEffectiveModel(...) after successful resolver.resolve() of the POM, when pomFile is unreadable (permissions, truncated/corrupt download, file deleted between resolve and read).","commonSituations":"Interrupted downloads leaving 0-byte or partial POMs in the local repository, disk permission problems, antivirus locking files on Windows, NFS/readonly ~/.m2 mounts.","solutions":["Delete the corrupt POM (and .lastUpdated/.part files) from the local repository and let Maven re-download it","Check file permissions on ~/.m2/repository paths","Verify disk space and filesystem health; disable interfering antivirus indexing on the repo directory","Re-run with a clean local repository (-Dmaven.repo.local=fresh-dir) to isolate corruption"],"exampleFix":"// before\nrm -rf ~/.m2/repository/com/acme/app/1.0.0  (corrupt files kept)\n// after\ncorrupt pom deleted, re-run resolution so a fresh POM is downloaded","handlingStrategy":"validation","validationCode":"Path pom = pomFile.toPath();\nif (!java.nio.file.Files.isReadable(pom) || java.nio.file.Files.size(pom) == 0) {\n    java.nio.file.Files.deleteIfExists(pom); // force re-download of corrupt POM\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Delete 0-byte or .part files from the local repository before resolving","Ensure ~/.m2/repository is not on a flaky/readonly mount","Exclude the Maven repo directory from antivirus scanning"],"tags":["maven","io","corrupt-artifact"],"backgroundTag":"corrupt-local-maven-repo","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"}