pinpoint-apm/pinpoint · error · InstrumentException
${interceptorClassName} not found Caused by:${ex.getMessage(
Error message
${interceptorClassName} not found Caused by:${ex.getMessage()} What it means
loadInterceptorClass loads an interceptor class into the target classloader via pluginContext.injectClass and wraps any failure into an InstrumentException stating '<interceptorClassName> not found'. This usually means the interceptor class is not visible to the target application's classloader, not that it is absent from the agent jar.
Source
Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMClass.java:382
logger.debug("Skip addSetter, setter already declared. class={}, setter={}", getName(), setterClass.getName());
}
} catch (Exception e) {
if (finalRemoved) {
fieldNode.setAccess(original);
}
throw e;
}
} catch (Exception e) {
throw new InstrumentException("Failed to add setter: " + setterClass.getName(), e);
}
}
private Class<? extends Interceptor> loadInterceptorClass(String interceptorClassName) throws InstrumentException {
try {
final ClassLoader classLoader = classNode.getClassLoader();
return this.pluginContext.injectClass(classLoader, interceptorClassName);
} catch (Exception ex) {
throw new InstrumentException(interceptorClassName + " not found Caused by:" + ex.getMessage(), ex);
}
}
private int addInterceptor0(Class<? extends Interceptor> interceptorClass, Object[] constructorArgs, InterceptorScope scope, ExecutionPolicy executionPolicy) throws InstrumentException {
int interceptorId = -1;
final TargetMethods targetMethods = interceptorClass.getAnnotation(TargetMethods.class);
if (targetMethods != null) {
for (TargetMethod m : targetMethods.value()) {
interceptorId = addInterceptor0(m, interceptorClass, constructorArgs, scope, executionPolicy);
}
}
final TargetMethod targetMethod = interceptorClass.getAnnotation(TargetMethod.class);
if (targetMethod != null) {
interceptorId = addInterceptor0(targetMethod, interceptorClass, constructorArgs, scope, executionPolicy);
}View on GitHub (pinned to 744c3d3075)
Solutions
- Ensure the interceptor class is packaged in the plugin jar deployed to the agent's plugin directory
- Check the interceptor class name for typos and correct package
- Inspect the cause message: if ClassNotFoundException, fix packaging/classloader visibility; if linkage errors, fix dependencies
- Verify the target classloader can see plugin classes (use Pinpoint's classloader rules or move the class to a visible location)
Example fix
// before
clazz.addScopedInterceptor("com.example.Mynterceptor", SCOPE); // typo
// after
clazz.addScopedInterceptor("com.example.MyInterceptor", SCOPE); Defensive patterns
Strategy: try-catch
Validate before calling
try {
Class.forName(interceptorClassName, false, pluginClassLoader);
} catch (ClassNotFoundException e) { /* fix packaging before deploying */ } Try / catch
try {
clazz.addInterceptor(interceptorClassName);
} catch (InstrumentException e) {
logger.warn("interceptor {} not loadable: {}", interceptorClassName, e.getMessage());
} Prevention
- Verify plugin jar contents with jar tf before deploy
- Deploy plugin jars to the agent plugin directory
- Keep interceptor names in constants, not inline strings
When it happens
Trigger: addInterceptor/addScopedInterceptor is called with an interceptor class name that injectClass cannot load into classNode.getClassLoader(); any Exception from injectClass is converted to this message.
Common situations: Interceptor class not packaged in the plugin jar; classloader visibility issues (bootstrap vs app classloader); typo in the interceptor class name; plugin not deployed in the agent's plugin directory.
Related errors
- annotationKey name must not be empty
- matcher type must not be empty
- Unknown matcher type :
- not found interceptorHolderClass, className=
- not found interceptor, className=
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/5beec42c902d29f6.
Report an issue: GitHub.