{"record":{"id":"3d346e30feeb913c","repo":"pinpoint-apm/pinpoint","slug":"not-found-interceptor-classname","errorCode":null,"errorMessage":"not found interceptor, className=","messagePattern":"not found interceptor, className=","errorType":"exception","errorClass":"InstrumentException","httpStatus":null,"severity":"error","filePath":"agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMInterceptorHolder.java","lineNumber":99,"sourceCode":"\n    public String getClassName() {\n        return className;\n    }\n\n    public Class<? extends Interceptor> loadInterceptorClass(ClassLoader classLoader) throws InstrumentException {\n        try {\n            final Class<?> clazz = loadClass(classLoader);\n            if (clazz == null) {\n                // defense code\n                throw new InstrumentException(\"not found interceptorHolderClass, className=\" + className);\n            }\n\n            final Method method = clazz.getDeclaredMethod(\"get\");\n            final Object o = method.invoke(null);\n            if (o instanceof Interceptor) {\n                return (Class<? extends Interceptor>) o.getClass();\n            } else {\n                throw new InstrumentException(\"not found interceptor, className=\" + className);\n            }\n        } catch (InvocationTargetException e) {\n            throw new InstrumentException(\"invocation fail, className=\" + className, e);\n        } catch (NoSuchMethodException e) {\n            throw new InstrumentException(\"not found 'get' method, className=\" + className, e);\n        } catch (IllegalAccessException e) {\n            throw new InstrumentException(\"access fail, className=\" + className, e);\n        }\n    }\n\n    public void init(Class<?> interceptorHolderClass, InterceptorFactory factory, Class<? extends Interceptor> interceptorClass, Object[] providedArguments, ScopeInfo scopeInfo, MethodDescriptor methodDescriptor) throws InstrumentException {\n        init(interceptorHolderClass, new InterceptorLazyLoadingSupplier(factory, interceptorClass, providedArguments, scopeInfo, methodDescriptor));\n    }\n\n    public void init(Class<?> interceptorHolderClass, Interceptor interceptor) throws InstrumentException {\n        init(interceptorHolderClass, new InterceptorSupplier(interceptor));\n    }\n","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMInterceptorHolder.java#L81-L117","documentation":"After loading the interceptor holder class, loadInterceptorClass() invokes its static get() method and expects the result to be an Interceptor instance. If the returned object is not an Interceptor, it throws InstrumentException 'not found interceptor, className=...'. The holder class was found but does not expose a valid interceptor via get().","triggerScenarios":"Holder class's static get() returns an object that fails the instanceof Interceptor check (returns null or an unrelated type).","commonSituations":"Wrong class registered as an interceptor holder; holder class refactored so get() returns something else; class version mismatch between agent and plugin where the Interceptor interface differs across classloaders (instanceof fails due to different ClassLoaders).","solutions":["Ensure get() returns an instance of the Interceptor interface","Verify the holder class is the intended interceptor class, not an unrelated class","Check that the Interceptor interface is loaded by the same classloader as the returned object (classloader identity matters for instanceof)","Regenerate the holder class with the current agent tooling if it was produced by an older version"],"exampleFix":"// before\npublic static Object get() { return new NotAnInterceptor(); }\n// after\npublic static Interceptor get() { return new MyInterceptor(); }","handlingStrategy":"validation","validationCode":"Object o = holderClass.getMethod(\"get\").invoke(null);\nif (!(o instanceof Interceptor)) {\n    throw new IllegalStateException(holderClass.getName() + \".get() does not return an Interceptor\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    Class<? extends Interceptor> c = holder.interceptorClass(classLoader);\n} catch (InstrumentException e) {\n    logger.warn(\"{} does not provide an Interceptor\", className, e);\n}","preventionTips":["Have get() declared to return the Interceptor type so the compiler enforces it","Ensure the Interceptor interface is loaded by a common parent classloader","Regenerate holders with current agent tooling after upgrades"],"tags":["java","classloading","interceptor"],"backgroundTag":"type-mismatch","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"}