{"record":{"id":"afe8db32126fe6be","repo":"pinpoint-apm/pinpoint","slug":"file-does-not-exist","errorCode":null,"errorMessage":" File does not exist","messagePattern":" File does not exist","errorType":"validation","errorClass":"PluginException","httpStatus":null,"severity":"error","filePath":"agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/plugin/PluginJar.java","lineNumber":75,"sourceCode":"        }\n    }\n\n    private static JarFile createJarFile(Path pluginJar) {\n        try {\n            verify(pluginJar);\n            return new JarFile(pluginJar.toFile());\n        } catch (IOException e) {\n            throw new PluginException(pluginJar + \" JarFile create error \" + e.getCause(), e);\n        }\n    }\n\n    public static PluginJar fromFilePath(Path path) {\n        return new PluginJar(path);\n    }\n\n    private static void verify(Path file) {\n        if (!Files.exists(file)) {\n            throw new PluginException(file + \" File does not exist\");\n        }\n        if (!Files.isRegularFile(file)) {\n            throw new PluginException(file + \" is not a file\");\n        }\n        if (!Files.isReadable(file)) {\n            throw new PluginException(file + \" File cannot be read\");\n        }\n    }\n\n    public URL getURL() {\n        return url;\n    }\n\n    public JarFile getJarFile() {\n        return jarFile;\n    }\n\n    public String getPluginId() {","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/plugin/PluginJar.java#L57-L93","documentation":"PluginJar.verify() pre-checks a plugin path before opening it: the file must exist, be a regular file, and be readable. When Files.exists() returns false it throws PinpointException '<path> File does not exist'. This fail-fast check gives a clearer message than letting JarFile open fail.","triggerScenarios":"PluginJar.fromFilePath() or new PluginJar(path) called with a path that does not exist on disk — wrong directory, mistyped filename, or the jar was deleted/moved before loading.","commonSituations":"Wrong plugins directory configured for the agent; plugin jar renamed or removed during redeployment; relative path resolved against a different working directory; container image missing the plugin.","solutions":["Confirm the path exists (ls the plugins directory) and correct the configured plugins dir or filename","Use absolute paths when constructing the plugin jar Path","Ensure deployment packages actually ship the plugin jar into the expected directory","Add a startup check listing missing plugin files before initializing the plugin loader"],"exampleFix":"// before\nPluginJar plugin = PluginJar.fromFilePath(Paths.get(\"plugins/my-plugin.jar\"));\n// after\nPath p = Paths.get(\"/opt/pinpoint/plugins/my-plugin.jar\");\nif (!Files.exists(p)) throw new ConfigException(\"missing plugin: \" + p);\nPluginJar plugin = PluginJar.fromFilePath(p);","handlingStrategy":"validation","validationCode":"Path p = Paths.get(pluginPath).toAbsolutePath().normalize();\nif (!Files.exists(p)) throw new IllegalArgumentException(\"plugin jar does not exist: \" + p);\nif (!Files.isRegularFile(p)) throw new IllegalArgumentException(\"not a regular file: \" + p);\nif (!Files.isReadable(p)) throw new IllegalArgumentException(\"not readable: \" + p);","typeGuard":null,"tryCatchPattern":"try {\n    PluginJar plugin = PluginJar.fromFilePath(p);\n} catch (PluginException e) {\n    logger.error(\"Plugin path invalid: {}\", e.getMessage());\n}","preventionTips":["Use absolute, normalized paths for plugin jars","Verify plugins exist in the container image/package before agent start","Re-check the plugins dir after each redeployment","Log the resolved plugins directory at agent startup"],"tags":["file-io","plugin-loading","path"],"backgroundTag":"file-not-found","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}