{"record":{"id":"d1e34f4235f68341","repo":"pinpoint-apm/pinpoint","slug":"not-found-d1e34f","errorCode":null,"errorMessage":" not found.","messagePattern":" not found\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"agent-module/bootstraps/bootstrap/src/main/java/com/navercorp/pinpoint/bootstrap/agentdir/AgentDirBaseClassPathResolver.java","lineNumber":72,"sourceCode":"    private final Path bootstrapJarPath;\n\n\n\n    public AgentDirBaseClassPathResolver(Path bootstrapJarPath) {\n        this.bootstrapJarPath = Objects.requireNonNull(bootstrapJarPath, \"classPath\");\n    }\n\n\n    @Override\n    public AgentDirectory resolve() {\n        if (!Files.isRegularFile(bootstrapJarPath)) {\n            throw new IllegalStateException(bootstrapJarPath + \" not found\");\n        }\n\n        // find bootstrap.jar\n        final Path bootstrapJarName = this.findBootstrapJar(this.bootstrapJarPath);\n        if (bootstrapJarName == null) {\n            throw new IllegalStateException(bootstrap.getSimplePattern() + \" not found.\");\n        }\n\n        final Path agentDirPath = getAgentDirPath(this.bootstrapJarPath);\n\n        final BootDir bootDir = resolveBootDir(agentDirPath);\n\n        final Path agentLibPath = getAgentLibPath(agentDirPath);\n        final List<Path> libs = resolveLib(agentLibPath);\n\n        Path agentPluginPath = getAgentPluginPath(agentDirPath);\n        final List<Path> plugins = resolvePlugins(agentPluginPath);\n\n        final AgentDirectory agentDirectory =\n                new AgentDirectory(bootstrapJarName, this.bootstrapJarPath, agentDirPath, bootDir, libs, plugins);\n\n        return agentDirectory;\n    }\n","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/bootstraps/bootstrap/src/main/java/com/navercorp/pinpoint/bootstrap/agentdir/AgentDirBaseClassPathResolver.java#L54-L90","documentation":"After confirming the bootstrap jar file exists, resolve() scans its directory for a file matching the bootstrap jar simple pattern via findBootstrapJar(). If no matching jar is found it throws IllegalStateException '<pattern> not found.' This means the agent directory layout is broken — the bootstrap jar is present at the given path but no file matching the expected name pattern exists there.","triggerScenarios":"The jar at bootstrapJarPath exists but its filename does not match bootstrap.getSimplePattern() (e.g. renamed or a non-standard build); findBootstrapJar returns null because the directory contents were replaced with jars of unexpected names.","commonSituations":"Renaming pinpoint-bootstrap.jar during custom packaging; mixing files from different Pinpoint versions after a manual upgrade; a build producing a snapshot jar name that no longer matches the pattern.","solutions":["Restore the original bootstrap jar filename (e.g. pinpoint-bootstrap-x.y.z.jar) so it matches the expected simple pattern","Re-extract the official Pinpoint agent distribution instead of a manually assembled directory","Check the resolved bootstrap jar name against the Pinpoint version's expected pattern and align your build/packaging","Point the agent at an unmodified agent directory from a release archive"],"exampleFix":"// before\nmv pinpoint-bootstrap-2.5.0.jar bootstrap.jar\n// after\n# keep the original name expected by the pattern\npinpoint-bootstrap-2.5.0.jar  (unmodified release layout)","handlingStrategy":"validation","validationCode":"try (var stream = Files.list(agentDir)) {\n    boolean found = stream.anyMatch(p -> p.getFileName().toString().startsWith(\"pinpoint-bootstrap\"));\n    if (!found) throw new IllegalStateException(\"no bootstrap jar matching pattern in \" + agentDir);\n}","typeGuard":"boolean hasBootstrapJar(Path agentDir) throws IOException {\n    if (agentDir == null || !Files.isDirectory(agentDir)) return false;\n    try (var s = Files.list(agentDir)) {\n        return s.anyMatch(p -> p.getFileName().toString().contains(\"pinpoint-bootstrap\"));\n    }\n}","tryCatchPattern":"try {\n    AgentDirectory dir = resolver.resolve();\n} catch (IllegalStateException e) {\n    if (e.getMessage() != null && e.getMessage().endsWith(\" not found.\")) {\n        // inspect agent dir contents vs expected bootstrap pattern\n    }\n    throw e;\n}","preventionTips":["Never rename jars inside the agent directory","Use the official release archive rather than hand-assembled class paths","After upgrades, diff the new agent dir against the release manifest"],"tags":["java","file-not-found","agent-bootstrap","packaging"],"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-14T05:17:10.506Z"}