pinpoint-apm/pinpoint · error · InstrumentException

not found Caused by:

Error message

 not found Caused by:

What it means

InstrumentException wrapping a failure to load a plugin interceptor class in ASMMethod.loadInterceptorClass. The original exception (usually ClassNotFoundException or LinkageError) is swallowed and its message appended after 'not found Caused by:'. It means the interceptor class named by the plugin could not be injected into the instrumented class's class loader.

Source

Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMMethod.java:104

        return this.methodNode.getAccess();
    }

    @Override
    public boolean isConstructor() {
        return this.methodNode.isConstructor();
    }

    @Override
    public MethodDescriptor getDescriptor() {
        return this.descriptor;
    }

    public Class<? extends Interceptor> loadInterceptorClass(String interceptorClassName) throws InstrumentException {
        try {
            ClassLoader classLoader = this.declaringClass.getClassLoader();
            return pluginContext.injectClass(classLoader, interceptorClassName);
        } catch (Exception ex) {
            throw new InstrumentException(interceptorClassName + " not found Caused by:" + ex.getMessage(), ex);
        }
    }

    @Override
    public int addInterceptor(Class<? extends Interceptor> interceptorClass) throws InstrumentException {
        Objects.requireNonNull(interceptorClass, "interceptorClass");

        final ASMInterceptorHolder interceptorHolder = newInterceptor(interceptorClass, null, null, null);
        addInterceptor0(interceptorClass, interceptorHolder);
        return interceptorHolder.getInterceptorId();
    }

    @Override
    public int addInterceptor(Class<? extends Interceptor> interceptorClass, Object[] constructorArgs) throws InstrumentException {
        Objects.requireNonNull(interceptorClass, "interceptorClass");
        Objects.requireNonNull(constructorArgs, "constructorArgs");

        final ASMInterceptorHolder interceptorHolder = newInterceptor(interceptorClass, constructorArgs, null, null);

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Verify the interceptor class name string matches the fully qualified class name in the plugin jar
  2. Ensure the plugin jar containing the interceptor is in the agent's plugin directory
  3. Check the wrapped 'Caused by' text for the real reason (ClassNotFound vs LinkageError/NoClassDefFound)
  4. If the interceptor is meant for the bootstrap class loader, verify it is registered for bootstrap injection

Example fix

// before
addInterceptor("com.plugin.OldInterceptor");
// after
addInterceptor("com.plugin.RenamedInterceptor"); // matches class in plugin jar
Defensive patterns

Strategy: try-catch

Try / catch

try {
    Class<? extends Interceptor> c = method.loadInterceptorClass(name);
} catch (InstrumentException e) {
    logger.error("interceptor {} not loadable in target classloader: {}", name, e.getMessage(), e);
}

Prevention

When it happens

Trigger: Calling loadInterceptorClass (via addInterceptor(String)) with a class name that is not on the target application's classpath; plugin jar missing from agent classpath; wrong interceptor class name string in plugin metadata.

Common situations: Renamed interceptor classes after plugin upgrade; the plugin jar not deployed to the agent's plugin directory; class loader isolation issues when the target class loader cannot see profiler/plugin classes.

Related errors


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/bf9e359e39b1c4ab. Report an issue: GitHub.