{"record":{"id":"435ba5fc2ed93a18","repo":"quarkusio/quarkus","slug":"no-interceptor-bindings","errorCode":null,"errorMessage":"No interceptor bindings","messagePattern":"No interceptor bindings","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/ArcContainerImpl.java","lineNumber":902,"sourceCode":"        for (InjectableObserverMethod<?> observer : observers) {\n            if (EventTypeAssignabilityRules.instance().matches(observer.getObservedType(), eventTypes)) {\n                if (observer.getObservedQualifiers().isEmpty()\n                        || registeredQualifiers.isSubset(observer.getObservedQualifiers(), eventQualifiers)) {\n                    resolvedObservers.add((InjectableObserverMethod<? super T>) observer);\n                }\n            }\n        }\n        // Observers with smaller priority values are called first\n        Collections.sort(resolvedObservers);\n        return resolvedObservers;\n    }\n\n    List<Interceptor<?>> resolveInterceptors(InterceptionType type, Annotation... interceptorBindings) {\n        if (interceptors.isEmpty()) {\n            return Collections.emptyList();\n        }\n        if (interceptorBindings.length == 0) {\n            throw new IllegalArgumentException(\"No interceptor bindings\");\n        }\n        registeredInterceptorBindings.verify(interceptorBindings);\n        List<Interceptor<?>> interceptors = new ArrayList<>();\n        List<Annotation> bindings = new ArrayList<>();\n        for (Annotation binding : interceptorBindings) {\n            bindings.add(binding);\n            Set<Annotation> transitive = registeredInterceptorBindings.getTransitive(binding.annotationType());\n            if (transitive != null) {\n                bindings.addAll(transitive);\n            }\n        }\n        for (InjectableInterceptor<?> interceptor : this.interceptors) {\n            if (interceptor.intercepts(type) && hasAllInterceptionBindings(interceptor, bindings)) {\n                interceptors.add(interceptor);\n            }\n        }\n        return interceptors;\n    }","sourceCodeStart":884,"sourceCodeEnd":920,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/ArcContainerImpl.java#L884-L920","documentation":"resolveInterceptors requires at least one interceptor binding annotation. With zero bindings there is nothing meaningful to match interceptors against, so Arc throws IllegalArgumentException immediately (after the early 'no interceptors registered' fast path). This guards BeanManager.resolveInterceptors(InterceptionType, Annotation...) usage.","triggerScenarios":"Calling beanManager.resolveInterceptors(InterceptionType.AROUND_INVOKE) or with an empty bindings array; programmatically building an interceptor chain and passing an empty annotation list; a bug in code that filters bindings down to zero.","commonSituations":"Custom AOP/extension code introspecting interceptors; dynamic proxies built by hand; reflection collecting annotations from a member that actually has none.","solutions":["Pass at least one interceptor binding annotation (e.g. @Transactional.Literal.INSTANCE or a custom binding literal)","Guard the call: if bindings.length == 0 return an empty list instead of calling resolveInterceptors","Check the annotations collected reflectively actually include @InterceptorBinding-annotated annotations"],"exampleFix":"// before\nmanager.resolveInterceptors(InterceptionType.AROUND_INVOKE); // empty\n\n// after\nmanager.resolveInterceptors(InterceptionType.AROUND_INVOKE,\n    MyBinding.Literal.INSTANCE);","handlingStrategy":"validation","validationCode":"if (bindings == null || bindings.length == 0) {\n    throw new IllegalArgumentException(\"At least one interceptor binding is required\");\n}\nList<Interceptor<?>> its = bm.resolveInterceptors(InterceptionType.AROUND_INVOKE, bindings);","typeGuard":null,"tryCatchPattern":"try {\n    return bm.resolveInterceptors(type, bindings);\n} catch (IllegalArgumentException e) {\n    LOGGER.warn(\"No interceptor bindings supplied\");\n    return List.of();\n}","preventionTips":["Always pass at least one binding annotation literal to resolveInterceptors","When collecting annotations reflectively, filter for @InterceptorBinding meta-annotated ones and check the result is non-empty","Write a unit test that exercises the interceptor chain assembly path"],"tags":["cdi","interceptors","illegal-argument"],"backgroundTag":"missing-interceptor-binding","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}