{"record":{"id":"06f705a30b1d65e1","repo":"pinpoint-apm/pinpoint","slug":"no-methods-are-intercepted-target-interceptor-06f705","errorCode":null,"errorMessage":"No methods are intercepted. target:{}, interceptor:{}, methodFilter:{}","messagePattern":"No methods are intercepted\\. target:(.+?), interceptor:(.+?), methodFilter:(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMClass.java","lineNumber":623,"sourceCode":"        Objects.requireNonNull(constructorArgs, \"constructorArgs\");\n        Objects.requireNonNull(interceptorScope, \"interceptorScope\");\n        Objects.requireNonNull(executionPolicy, \"executionPolicy\");\n        return addScopedInterceptor0(filter, interceptorClass, constructorArgs, interceptorScope, executionPolicy);\n    }\n\n    private int addScopedInterceptor0(MethodFilter filter, Class<? extends Interceptor> interceptorClass, Object[] constructorArgs, InterceptorScope interceptorScope, ExecutionPolicy executionPolicy) throws InstrumentException {\n        int interceptorId = -1;\n        for (InstrumentMethod m : getDeclaredMethods(filter)) {\n            if (interceptorId != -1) {\n                m.addInterceptor(interceptorId);\n            } else {\n                // TODO casting fix\n                interceptorId = ((ASMMethod) m).addInterceptorInternal(interceptorClass, constructorArgs, interceptorScope, executionPolicy);\n            }\n        }\n\n        if (interceptorId == -1) {\n            logger.warn(\"No methods are intercepted. target:{}, interceptor:{}, methodFilter:{}\", this.classNode.getInternalName(), interceptorClass, filter.getClass().getName());\n        }\n\n        return interceptorId;\n    }\n\n    @Override\n    public List<InstrumentClass> getNestedClasses(ClassFilter filter) {\n        Objects.requireNonNull(filter, \"filter\");\n\n        final List<InstrumentClass> nestedClasses = new ArrayList<>();\n        for (ASMClassNodeAdapter innerClassNode : this.classNode.getInnerClasses()) {\n            final ASMNestedClass nestedClass = new ASMNestedClass(engineComponent, this.pluginContext, innerClassNode);\n            if (filter.accept(nestedClass)) {\n                nestedClasses.add(nestedClass);\n            }\n        }\n\n        return nestedClasses;","sourceCodeStart":605,"sourceCodeEnd":641,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMClass.java#L605-L641","documentation":"An overload of ASMClass's interceptor-adding API (taking a raw MethodFilter object) logs this warning when the supplied filter rejects every declared method of the class, leaving interceptorId at -1. As with the name-based variant, no interception point was installed for the target class and the plugin's interceptor never runs.","triggerScenarios":"Programmatic plugin API addInterceptor(methodFilter, ...) / addScopedInterceptor invoked against a class whose declared methods all fail the custom filter's accept() predicate.","commonSituations":"Custom MethodFilter written against the wrong target class; filter conditions (modifiers, descriptors, annotations) too strict; target class refactored so its methods no longer match.","solutions":["Debug the filter's accept() against the class's declared method list (classNode.methods)","Relax overly strict modifier/descriptor conditions in the filter","Confirm the transformer is applied to the class that actually declares the method, not a subclass","Add a test that asserts interceptorId != -1 for the target class to catch regressions"],"exampleFix":"// before\nif (Modifier.isPublic(opcodes) && method.getName().equals(\"execute\") && method.getParameterTypes().isEmpty()) { ... }\n// after\nif (method.getName().equals(\"execute\")) { ... } // drop the parameter-types clause that never matched","handlingStrategy":"validation","validationCode":"boolean anyMatched = Arrays.stream(targetClass.getDeclaredMethods()).anyMatch(m -> methodFilter.accept(wrap(m))); if (!anyMatched) { /* loosen filter before instrumentation */ }","typeGuard":"function filterMatchesAny(clazz, filter) { return clazz.getDeclaredMethods().some(m => { try { return filter.accept(m); } catch (e) { return false; } }); }","tryCatchPattern":"if (interceptorId == -1) { logger.warn(\"No methods are intercepted. target:{}, interceptor:{}, methodFilter:{}\", internalName, interceptorClass, filter.getClass().getName()); }","preventionTips":["Unit-test custom MethodFilters against the real target class bytes","Avoid overly strict modifier/descriptor conditions in filters","Re-verify filters after every upgrade of the instrumented library","Assert instrumentation results in plugin integration tests"],"tags":["bytecode","instrumentation","asm","method-filter"],"backgroundTag":"unsupported-operation","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"}