quarkusio/quarkus · error · java.io.UncheckedIOException
Failed to read
Error message
Failed to read
What it means
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.
Source
Thrown at independent-projects/bootstrap/app-model/src/main/java/io/quarkus/paths/ArchivePathTree.java:105
this.pathFilter = pathFilter;
}
@Override
public boolean isArchiveOrigin() {
return true;
}
@Override
public Collection<Path> getRoots() {
return List.of(archive);
}
@Override
public void walk(PathVisitor visitor) {
try (OpenPathTree open = open()) {
open.walk(visitor);
} catch (IOException e) {
throw new UncheckedIOException("Failed to read " + archive, e);
}
}
@Override
public void walkRaw(PathVisitor visitor) {
try (OpenPathTree open = open()) {
open.walkRaw(visitor);
} catch (IOException e) {
throw new UncheckedIOException("Failed to read " + archive, e);
}
}
@Override
public void walkIfContains(String resourceDirName, PathVisitor visitor) {
ensureResourcePath(resourceDirName);
if (!PathFilter.isVisible(pathFilter, resourceDirName)) {
return;
}View on GitHub (pinned to e1c734241f)
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
Example fix
// before
tree.walk(visitor); // throws UncheckedIOException if jar unreadable
// after
try {
tree.walk(visitor);
} catch (UncheckedIOException e) {
LOG.warnf("Skipping unreadable archive: %s", e.getMessage());
} Defensive patterns
Strategy: try-catch
Validate before calling
boolean archiveReadable(Path archive) {
try (var fs = ZipUtils.openReadOnly(archive)) { return true; }
catch (IOException e) { return false; }
} Try / catch
try {
tree.walk(visitor);
} catch (UncheckedIOException e) {
LOG.warnf("Unreadable archive %s: %s", e.getCause().getMessage());
} Prevention
- Verify archive existence/readability before traversal
- Re-download corrupt dependencies instead of ignoring them
- Avoid cleaning output dirs while indexes are being built
When it happens
Trigger: Calling walk(PathVisitor) on an ArchivePathTree whose archive cannot be opened by ZipUtils.openReadOnly: file missing, unreadable, or not a valid zip.
Common situations: 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.
Related errors
- Failed to read
- Failed to read %s
- Failed to read resources from classpath
- Could not read class path resources having path '${resourceP
- Failed to load + pomPropsPath + from the classpath
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/48f6115098bb626c.
Report an issue: GitHub.