{"record":{"id":"e921742eabead76b","repo":"pinpoint-apm/pinpoint","slug":"is-not-a-directory","errorCode":null,"errorMessage":" is not a directory","messagePattern":" is not a directory","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"agent-module/bootstraps/bootstrap/src/main/java/com/navercorp/pinpoint/bootstrap/agentdir/AgentDirBaseClassPathResolver.java","lineNumber":154,"sourceCode":"\n        if (checkDirectory(agentLibPath)) {\n            return Collections.emptyList();\n        }\n\n        final List<Path> libFileList = FileUtils.listFiles(agentLibPath, EXTENSIONS);\n        if (libFileList.isEmpty()) {\n            throw new RuntimeException(agentLibPath + \" lib dir is empty\");\n        }\n        // add directory\n        libFileList.add(agentLibPath);\n\n        return libFileList;\n    }\n\n    private List<Path> resolvePlugins(Path agentPluginPath) {\n\n        if (checkDirectory(agentPluginPath)) {\n            logger.warn(agentPluginPath + \" is not a directory\");\n            return Collections.emptyList();\n        }\n\n        final List<Path> jars = FileUtils.listFiles(agentPluginPath, \"*.jar\");\n        if (jars.isEmpty()) {\n            return Collections.emptyList();\n        }\n\n        List<Path> pluginFileList = filterReadPermission(jars);\n        for (Path pluginJar : pluginFileList) {\n            logger.info(\"plugin path:\" + FileUtils.subpathAfterLast(pluginJar, 2));\n        }\n        return pluginFileList;\n    }\n\n    private boolean checkDirectory(Path file) {\n        if (!Files.exists(file)) {\n            logger.warn(file + \" not found\");","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/bootstraps/bootstrap/src/main/java/com/navercorp/pinpoint/bootstrap/agentdir/AgentDirBaseClassPathResolver.java#L136-L172","documentation":"AgentDirBaseClassPathResolver.resolvePlugins() logs this warning when the configured plugin directory path fails the checkDirectory() guard, i.e. the path either does not exist or exists but is not a directory. The resolver then returns an empty plugin list, so the agent boots without any plugins loaded. It is a diagnostic warning, not a thrown exception.","triggerScenarios":"Starting the Pinpoint agent when -Dpinpoint.agent.pluginDir (or the default ${AGENT_HOME}/plugin) points to a nonexistent path or to a regular file instead of a directory.","commonSituations":"AGENT_HOME misconfigured in the launch script; plugin dir renamed or deleted during upgrade; user pointed pluginDir at the plugin JAR file itself instead of the containing directory; packaged distribution missing the plugin folder.","solutions":["Verify the plugin directory path actually exists: ls <agentDir>/plugin","If the path points at a JAR file, point it at the parent directory instead","Set -Dpinpoint.agent.pluginDir to a valid absolute directory path","Re-install/extract the Pinpoint agent distribution so the plugin folder exists","Check logs for the companion 'not found' vs 'is not a directory' warning to distinguish the two cases"],"exampleFix":"// before (launch script)\nJAVA_OPTS=\"$JAVA_OPTS -Dpinpoint.agent.pluginDir=$AGENT_HOME/plugin/pinpoint-bootstrap-core.jar\"\n// after\nJAVA_OPTS=\"$JAVA_OPTS -Dpinpoint.agent.pluginDir=$AGENT_HOME/plugin\"","handlingStrategy":"validation","validationCode":"java.nio.Path p = Paths.get(pluginDir); if (!java.nio.Files.isDirectory(p)) { throw new IllegalArgumentException(pluginDir + \" is not a directory\"); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass a directory path (not a JAR) to pluginDir/libDir options","Use absolute paths resolved from AGENT_HOME","Verify the agent distribution layout after extraction","Add a pre-start script that checks required directories exist"],"tags":["agent","classpath","plugin-loading","logging","filesystem"],"backgroundTag":"path-is-not-a-directory","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"}