{"record":{"id":"d7511b944b69d984","repo":"quarkusio/quarkus","slug":"no-interceptionproxy-registered-for-this-synthetic","errorCode":null,"errorMessage":"No InterceptionProxy registered for this synthetic bean; call injectInterceptionProxy()","messagePattern":"No InterceptionProxy registered for this synthetic bean; call injectInterceptionProxy\\(\\)","errorType":"exception","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/SyntheticCreationalContextImpl.java","lineNumber":65,"sourceCode":"\n    @Override\n    public <R> R getInjectedReference(Class<R> requiredType, Annotation... qualifiers) {\n        return getReference(requiredType, qualifiers);\n    }\n\n    @Override\n    public <R> R getInjectedReference(TypeLiteral<R> requiredType, Annotation... qualifiers) {\n        return getReference(requiredType.getType(), qualifiers);\n    }\n\n    @Override\n    public <R> InterceptionProxy<R> getInterceptionProxy() {\n        for (Map.Entry<TypeAndQualifiers, Object> entry : injectedReferences.entrySet()) {\n            if (entry.getKey().requiredType.getTypeName().startsWith(InterceptionProxy.class.getName())) {\n                return (InterceptionProxy<R>) entry.getValue();\n            }\n        }\n        throw new IllegalArgumentException(\n                \"No InterceptionProxy registered for this synthetic bean; call injectInterceptionProxy()\");\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    private <R> R getReference(Type requiredType, Annotation... qualifiers) {\n        if (qualifiers.length == 0) {\n            qualifiers = new Annotation[] { Default.Literal.INSTANCE };\n        }\n        R ref = (R) injectedReferences.get(new TypeAndQualifiers(requiredType, qualifiers));\n        if (ref == null) {\n            throw new IllegalArgumentException(\"A synthetic injection point was not declared for required type [\" + requiredType\n                    + \" and qualifiers: \" + Arrays.toString(qualifiers));\n        }\n        return ref;\n    }\n\n    public final static class TypeAndQualifiers {\n","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/SyntheticCreationalContextImpl.java#L47-L83","documentation":"SyntheticCreationalContextImpl.getInterceptionProxy() looks for an injected InterceptionProxy among the synthetic bean's injected references. If none was registered via injectInterceptionProxy(), it throws this IllegalArgumentException. InterceptionProxy for synthetic beans must be explicitly requested during bean creation.","triggerScenarios":"Inside a synthetic bean's create() function, calling creationalContext.getInterceptionProxy() without first having called injectInterceptionProxy() (typically in SyntheticBeanBuildItem configuration).","commonSituations":"Writing a CDI extension that registers a synthetic bean needing intercepted method calls but forgetting the interception proxy wiring; copying a synthetic bean example and omitting the proxy injection step.","solutions":["Call injectInterceptionProxy() when configuring the SyntheticBeanBuildItem","Then use creationalContext.getInterceptionProxy() inside the create function","Alternatively inject the InterceptionProxy as a synthetic injection point and read it via getInjectedReference"],"exampleFix":"// before\nSyntheticBeanBeanBuildItem.builder(MyBean.class).createWith(ctx -> new MyBeanImpl(ctx))\n// after\nSyntheticBeanBeanBuildItem.builder(MyBean.class)\n    .injectInterceptionProxy()\n    .createWith(ctx -> new MyBeanImpl(ctx.getInterceptionProxy()))","handlingStrategy":"validation","validationCode":"// build time: ensure proxy is declared on the SyntheticBeanBuildItem\n// .injectInterceptionProxy()\n// runtime guard:\nboolean hasProxy = ctx.getInjectedReferences().keySet().stream()\n    .anyMatch(tq -> tq.getRequiredType().getTypeName().startsWith(InterceptionProxy.class.getName()));","typeGuard":null,"tryCatchPattern":"try { return ctx.getInterceptionProxy(); }\ncatch (IllegalArgumentException e) { throw new IllegalStateException(\"Add .injectInterceptionProxy() to the SyntheticBeanBuildItem\", e); }","preventionTips":["Always pair injectInterceptionProxy() at build time with getInterceptionProxy() at runtime","Review synthetic bean builder configuration when copying examples"],"tags":["cdi","synthetic-bean","interception-proxy","quarkus-arc"],"backgroundTag":"missing-interception-proxy","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"}