{"record":{"id":"98df67d832bb1ced","repo":"quarkusio/quarkus","slug":"failed-to-process-path","errorCode":null,"errorMessage":"Failed to process ${path}","messagePattern":"Failed to process (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/deployment/index/ApplicationArchiveBuildStep.java","lineNumber":362,"sourceCode":"        Indexer indexer = new Indexer();\n        for (Path path : classFilesToIndex) {\n            try (InputStream in = Files.newInputStream(path)) {\n                indexer.index(in);\n            } catch (IOException e) {\n                throw new RuntimeException(e);\n            }\n        }\n        return indexer.complete();\n    }\n\n    private static Index handleJarPath(Path path, IndexCache indexCache, Set<String> removed) {\n        return indexCache.cache.computeIfAbsent(path, new Function<Path, Index>() {\n            @Override\n            public Index apply(Path path) {\n                try {\n                    return IndexingUtil.indexJar(path, removed);\n                } catch (IOException e) {\n                    throw new RuntimeException(\"Failed to process \" + path, e);\n                }\n            }\n        });\n    }\n\n    /**\n     * When running in hot deployment mode we know that java archives will never change, there is no need\n     * to re-index them each time. We cache them here to reduce the hot reload time.\n     */\n    private static final class IndexCache {\n        final Map<Path, Index> cache = new HashMap<>();\n    }\n}\n","sourceCodeStart":344,"sourceCodeEnd":376,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/deployment/index/ApplicationArchiveBuildStep.java#L344-L376","documentation":"ApplicationArchiveBuildStep's index cache computes a Jandex Index for each archive JAR via IndexingUtil.indexJar; an IOException during indexing is wrapped as RuntimeException 'Failed to process <path>'. This occurs while Quarkus builds the application index of dependency archives at augmentation time.","triggerScenarios":"computeIfAbsent(...).apply(path) on an archive JAR whose file cannot be read: missing, truncated, corrupt zip, or unreadable due to permissions, during quarkus build/augment.","commonSituations":"Corrupted JAR in local Maven repository (~/.m2) from an interrupted download; partially copied dependencies in CI cache; classpath JAR deleted/replaced while build runs; unreadable file permissions in container images.","solutions":["Delete the offending JAR from the local repo and rebuild (e.g. find ~/.m2 -name '*.jar' corrupted one; rm; mvn again)","Run ./mvnw clean and clear build caches if a copied artifact is truncated","Check file permissions/readability of the JAR inside the container/CI workspace","Refresh dependency caches in CI (re-download instead of reusing suspect cache)"],"exampleFix":"// before: corrupt artifact in ~/.m2\nrm -rf ~/.m2/repository/org/acme/broken-artifact\n// after: re-download\n./mvnw -U clean package","handlingStrategy":"validation","validationCode":"Path jar = Path.of(pathToArchive);\nif (!Files.isRegularFile(jar) || Files.size(jar) == 0 || !isReadableZip(jar)) {\n    throw new IllegalStateException(\"Invalid archive JAR: \" + jar + \" — delete from ~/.m2 and re-download\");\n}","typeGuard":"static boolean looksLikeJar(Path p) {\n    try {\n        if (!Files.isRegularFile(p) || Files.size(p) < 4) return false;\n        byte[] head = new byte[4];\n        try (var in = Files.newInputStream(p)) { in.readNBytes(head, 0, 4); }\n        return head[0]=='P' && head[1]=='K'; // zip magic\n    } catch (IOException e) { return false; }\n}","tryCatchPattern":"try {\n    buildArchives();\n} catch (RuntimeException e) {\n    if (e.getMessage().startsWith(\"Failed to process \")) {\n        Path bad = Path.of(e.getMessage().replace(\"Failed to process \", \"\"));\n        Files.deleteIfExists(Path.of(System.getProperty(\"user.home\"), \".m2\", ...)); // then re-resolve\n    }\n    throw e;\n}","preventionTips":["Use -U / fresh CI dependency caches when downloads are interrupted","Verify CI cache uploads complete before publishing (checksum the artifact store)","Watch for disk-full conditions during dependency resolution"],"tags":["jandex","indexing","build-time"],"backgroundTag":"corrupt-jar-indexing","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"}