{"record":{"id":"1982a51173e5126b","repo":"MuntashirAkon/AppManager","slug":"class-definition-for-node-getfullpath-is-not-found-1982a5","errorCode":null,"errorMessage":"Class definition for + node.getFullPath() + is not found.","messagePattern":"Class definition for \\+ node\\.getFullPath\\(\\) \\+ is not found\\.","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"app/src/main/java/io/github/muntashirakon/io/fs/ZipFileSystem.java","lineNumber":342,"sourceCode":"        if (access == OsConstants.R_OK) {\n            return true;\n        }\n        if (access == OsConstants.W_OK) {\n            return Objects.requireNonNull(getOptions()).readWrite;\n        }\n        if (access == (OsConstants.R_OK | OsConstants.W_OK)) {\n            return Objects.requireNonNull(getOptions()).readWrite;\n        }\n        // X_OK, R_OK|X_OK, R_OK|W_OK|X_OK are false\n        return false;\n    }\n\n    @NonNull\n    @Override\n    protected InputStream getInputStream(@NonNull Node<?> node) throws IOException {\n        ZipEntry zipEntry = (ZipEntry) node.getObject();\n        if (zipEntry == null) {\n            throw new FileNotFoundException(\"Class definition for \" + node.getFullPath() + \" is not found.\");\n        }\n        return Objects.requireNonNull(mZipFile).getInputStream(zipEntry);\n    }\n\n    @Override\n    protected void cacheFile(@NonNull Node<?> src, @NonNull File sink) throws IOException {\n        try (InputStream is = getInputStream(src);\n             FileOutputStream os = new FileOutputStream(sink)) {\n            IoUtils.copy(is, os);\n        }\n    }\n\n    @NonNull\n    private static Node<ZipEntry> buildTree(@NonNull ZipFile zipFile) {\n        Node<ZipEntry> rootNode = new Node<>(null, File.separator);\n        Enumeration<? extends ZipEntry> zipEntries = zipFile.entries();\n        while (zipEntries.hasMoreElements()) {\n            ZipEntry zipEntry = zipEntries.nextElement();","sourceCodeStart":324,"sourceCodeEnd":360,"githubUrl":"https://github.com/MuntashirAkon/AppManager/blob/0152f468fc9463ee02dc2ca83f6fe4989a2c4ca5/app/src/main/java/io/github/muntashirakon/io/fs/ZipFileSystem.java#L324-L360","documentation":"ZipFileSystem.getInputStream(node) casts node.getObject() to ZipEntry. If the node holds no cached ZipEntry (null), it throws FileNotFoundException(\"Class definition for <path> is not found.\"). The message is misleading — it actually means the zip entry object for that node was never populated or was dropped from cache.","triggerScenarios":"Reading a stream for a ZIP node whose getObject() is null — typically when cacheFile() is called for a node that was not previously scanned into the zip entry index, or the entry list was rebuilt and the node's ZipEntry reference was lost.","commonSituations":"Extracting a file from a ZIP whose entry table was re-scanned; using a Node from a stale filesystem snapshot after the archive was modified; subclasses whose scan didn't attach ZipEntry objects to nodes; large archives where entry objects are lazily loaded.","solutions":["Refresh/re-scan the ZipFileSystem so nodes get their ZipEntry objects attached before reading.","Obtain the node from the live ZipFileSystem instance rather than a stale snapshot.","Verify node.getObject() instanceof ZipEntry before calling getInputStream.","Catch FileNotFoundException and reopen the archive to rebuild the entry index."],"exampleFix":"// before\nInputStream in = zipFs.getInputStream(staleNode);\n// after\nzipFs.refresh();\nNode<?> node = zipFs.getNode(staleNode.getFullPath());\nif (node != null && node.getObject() instanceof ZipEntry) {\n    InputStream in = zipFs.getInputStream(node);\n}","handlingStrategy":"try-catch","validationCode":"if (!(node.getObject() instanceof ZipEntry)) { zipFs.refresh(); node = zipFs.getNode(node.getFullPath()); }","typeGuard":"boolean hasZipEntry(Node<?> n) { return n.getObject() instanceof ZipEntry; }","tryCatchPattern":"try { return zipFs.getInputStream(node); } catch (FileNotFoundException e) { zipFs.refresh(); return zipFs.getInputStream(zipFs.getNode(node.getFullPath())); }","preventionTips":["Re-scan the ZipFileSystem after modifications","Use nodes from the live filesystem, not cached snapshots","Assert getObject() instanceof ZipEntry in debug builds"],"tags":["zip","filesystem","stale-cache"],"backgroundTag":"entity-not-found","analyzedSha":"0152f468fc9463ee02dc2ca83f6fe4989a2c4ca5","analyzedAt":"2026-09-12T14:03:37.243Z","contentChangedAt":"2026-09-12T14:03:37.243Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}