pinpoint-apm/pinpoint · error · InstrumentException
not found method. ${classInternalName}.${methodName}
Error message
not found method. ${classInternalName}.${methodName} What it means
copyPointCutMethods() weaves each @Interceptor pointcut method from the advice into the source class by looking up a declared method with the same name and descriptor. If the source class has no such method, InstrumentException is thrown with the class internal name and method name, since the join point does not exist.
Source
Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMAspectWeaver.java:113
for (ASMMethodNodeAdapter methodNode : methodNodes.utils) {
if (!methodNode.isPrivate()) {
throw new InstrumentException("non private UtilMethod unsupported. method=" + methodNode.getLongName());
}
classNode.copyMethod(methodNode);
}
}
private void copyPointCutMethods(final MethodNodes methodNodes, final ASMClassNodeAdapter classNode) throws InstrumentException {
final ASMMethodInsnNodeRemapper.Builder remapBuilder = new ASMMethodInsnNodeRemapper.Builder();
for (ASMMethodNodeAdapter joinPointMethodNode : methodNodes.jointPoints) {
remapBuilder.addFilter(null, joinPointMethodNode.getName(), joinPointMethodNode.getDesc());
}
for (ASMMethodNodeAdapter pointCutMethodNode : methodNodes.pointCuts) {
final ASMMethodNodeAdapter sourceMethodNode = classNode.getDeclaredMethod(pointCutMethodNode.getName(), pointCutMethodNode.getDesc());
if (sourceMethodNode == null) {
throw new InstrumentException("not found method. " + classNode.getInternalName() + "." + pointCutMethodNode.getName());
}
if (!sourceMethodNode.getDesc().equals(pointCutMethodNode.getDesc())) {
throw new InstrumentException("Signature miss match. method=" + pointCutMethodNode.getName() + ", source=" + sourceMethodNode.getDesc() + ", advice=" + pointCutMethodNode.getDesc());
}
if (logger.isInfoEnabled()) {
logger.info("weaving method={}{}", sourceMethodNode.getName(), sourceMethodNode.getDesc());
}
// rename.
final String methodName = this.methodNameReplacer.replaceMethodName(sourceMethodNode.getName());
sourceMethodNode.rename(methodName);
// set private.
sourceMethodNode.setAccess(sourceMethodNode.getAccess() & -6 | Opcodes.ACC_PRIVATE);
// copy.
classNode.copyMethod(pointCutMethodNode);
View on GitHub (pinned to 744c3d3075)
Solutions
- Update the pointcut method name to match the current source class method
- Pin/adjust the plugin to the target library version that still declares the method
- Confirm the method is declared (not just inherited) on the source class; getDeclaredMethod only sees declared methods
- Dump the source class methods to verify the expected join point exists
Example fix
// before
public void interceptor_before_targetOldMethod(...) { ... }
// after
public void interceptor_before_targetNewMethod(...) { ... } Defensive patterns
Strategy: validation
Validate before calling
if (sourceClassNode.getDeclaredMethod(pointCutName, pointCutDesc) == null) { throw new IllegalArgumentException("join point not declared: " + pointCutName); } Try / catch
try { weaver.weaving(src, adv); } catch (InstrumentException e) { if (e.getMessage().startsWith("not found method.")) { logger.error("stale pointcut after library upgrade: {}", e.getMessage()); } } Prevention
- Keep advice in sync with target library versions
- Pin dependency versions in plugin builds
- Only target declared (not inherited) methods
When it happens
Trigger: The advice class declares a pointcut method whose name does not match any method declared in the source class (name mismatch, method renamed/removed, or inherited-only methods that getDeclaredMethod does not return).
Common situations: Target library upgraded and the intercepted method was renamed or removed; advice written against an older version of the source class; typo in the pointcut method name.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- @Aspect not found. adviceClass=${adviceClassInternalName}
- non private UtilMethod unsupported. method=${methodLongName}
- Signature miss match. method=${methodName}, source=${sourceD
- source and advice class node must not be null.
- invalid class hierarchy. source class=${sourceClassInternalN
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/7df0cc224edca79d.
Report an issue: GitHub.