pinpoint-apm/pinpoint · warning
too many
Error message
too many
What it means
BootDir.find() locates a specific boot jar (e.g. javassist.jar) by pattern match inside the agent boot directory. When more than one file matches the pattern, it logs 'too many <jarName> found' and returns null, meaning the boot jar path could not be resolved unambiguously.
Solutions
- Inspect the boot directory and remove older/duplicate JARs matching the reported name
- Clean-install the agent distribution instead of overlaying upgrades
- Keep exactly one version of each library in the boot directory
- Move stale jars to a backup directory outside the agent tree
Example fix
// before ls boot/ javassist-3.29.2-ga.jar javassist-3.23.1-ga.jar // after rm boot/javassist-3.23.1-ga.jar ls boot/ javassist-3.29.2-ga.jar
Defensive patterns
Strategy: validation
Validate before calling
try (java.util.stream.Stream<Path> s = java.nio.Files.list(Paths.get(agentHome, "boot"))) { long n = s.filter(f -> f.getFileName().toString().startsWith("javassist")).count(); if (n > 1) throw new IllegalStateException("duplicate boot jars: " + n); } Prevention
- Clean-install agent distributions instead of overlaying upgrades
- Keep exactly one version of each library in boot/
- Remove .bak/.old/backup jars from the agent directory
- Automate upgrade as: delete old dir, extract new dir, reapply config
When it happens
Trigger: Agent boot directory contains two or more JARs whose names match the same pattern (e.g. javassist-3.x.jar and javassist-3.y.jar left behind by an upgrade).
Common situations: Upgrading Pinpoint by overwriting the new distribution onto an old one without cleaning boot/; manually dropping a different version of a library into the boot dir; backup copies like javassist.jar.bak or javassist-old.jar present.
Related errors
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/dc86720c67e29e29.
Report an issue: GitHub.
Appendix: source
Thrown at agent-module/bootstraps/bootstrap/src/main/java/com/navercorp/pinpoint/bootstrap/agentdir/BootDir.java:81
return resolvedJarList;
}
private Path find(List<Path> jarFiles, final JarDescription jarDescription) {
final String jarName = jarDescription.getJarName();
final Pattern pattern = jarDescription.getVersionPattern();
final List<Path> jarPathList = findFileByPattern(jarFiles, pattern);
if (jarPathList.isEmpty()) {
logger.info(jarName + " not found.");
return null;
}
if (jarPathList.size() == 1) {
final Path file = jarPathList.get(0);
logger.info("boot path:" + FileUtils.subpathAfterLast(file, 2));
return FileUtils.toRealPath(file);
}
logger.warn("too many " + jarName + " found. " + jarPathList);
return null;
}
private List<Path> findFileByPattern(List<Path> jarFiles, Pattern pattern) {
List<Path> findList = new ArrayList<>();
for (Path jarFile : jarFiles) {
final Path fileName = jarFile.getFileName();
if (fileName != null) {
Matcher matcher = pattern.matcher(fileName.toString());
if (matcher.matches()) {
findList.add(jarFile);
}
}
}
return findList;
}
public List<Path> getJarPath() {View on GitHub (pinned to 744c3d3075)