{"record":{"id":"48f6115098bb626c","repo":"quarkusio/quarkus","slug":"failed-to-read-48f611","errorCode":null,"errorMessage":"Failed to read ","messagePattern":"Failed to read ","errorType":"exception","errorClass":"java.io.UncheckedIOException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/app-model/src/main/java/io/quarkus/paths/ArchivePathTree.java","lineNumber":105,"sourceCode":"        this.pathFilter = pathFilter;\n    }\n\n    @Override\n    public boolean isArchiveOrigin() {\n        return true;\n    }\n\n    @Override\n    public Collection<Path> getRoots() {\n        return List.of(archive);\n    }\n\n    @Override\n    public void walk(PathVisitor visitor) {\n        try (OpenPathTree open = open()) {\n            open.walk(visitor);\n        } catch (IOException e) {\n            throw new UncheckedIOException(\"Failed to read \" + archive, e);\n        }\n    }\n\n    @Override\n    public void walkRaw(PathVisitor visitor) {\n        try (OpenPathTree open = open()) {\n            open.walkRaw(visitor);\n        } catch (IOException e) {\n            throw new UncheckedIOException(\"Failed to read \" + archive, e);\n        }\n    }\n\n    @Override\n    public void walkIfContains(String resourceDirName, PathVisitor visitor) {\n        ensureResourcePath(resourceDirName);\n        if (!PathFilter.isVisible(pathFilter, resourceDirName)) {\n            return;\n        }","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/paths/ArchivePathTree.java#L87-L123","documentation":"ArchivePathTree.walk traverses all entries of an archive (jar/zip)-backed path tree. Opening the underlying zip filesystem can throw IOException (missing/corrupt archive); this method converts it to UncheckedIOException('Failed to read <archive>') so callers using the visitor API don't need checked exceptions.","triggerScenarios":"Calling walk(PathVisitor) on an ArchivePathTree whose archive cannot be opened by ZipUtils.openReadOnly: file missing, unreadable, or not a valid zip.","commonSituations":"Jar deleted from local repo between resolution and traversal; corrupted jar from a failed download; permission problems; pointing a path tree at a non-zip file.","solutions":["Verify the archive file exists and is readable at the reported path","Test archive integrity (unzip -t) and re-download/reinstall the artifact if corrupt","Check file permissions and that the file is actually a zip (not an HTML error page saved as .jar)","Catch UncheckedIOException at the call site if traversal of a missing archive is an expected condition"],"exampleFix":"// before\ntree.walk(visitor); // throws UncheckedIOException if jar unreadable\n// after\ntry {\n    tree.walk(visitor);\n} catch (UncheckedIOException e) {\n    LOG.warnf(\"Skipping unreadable archive: %s\", e.getMessage());\n}","handlingStrategy":"try-catch","validationCode":"boolean archiveReadable(Path archive) {\n    try (var fs = ZipUtils.openReadOnly(archive)) { return true; }\n    catch (IOException e) { return false; }\n}","typeGuard":null,"tryCatchPattern":"try {\n    tree.walk(visitor);\n} catch (UncheckedIOException e) {\n    LOG.warnf(\"Unreadable archive %s: %s\", e.getCause().getMessage());\n}","preventionTips":["Verify archive existence/readability before traversal","Re-download corrupt dependencies instead of ignoring them","Avoid cleaning output dirs while indexes are being built"],"tags":["io","zip","classpath","unchecked-io"],"backgroundTag":"unreadable-archive","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"}