Description of problem: Version-Release number of selected component (if applicable): 6.1.0.GA How reproducible: 10% Steps to Reproduce: 1. Create CDI Bean 2. Create a Interceptor Binding Annotation 3. Add Interceptor Binding to CDI Bean 4. Create a Interceptor 5. Run code, all OK 6. Add _any_ non Dependent scope to the Interceptor @Request|Session|ApplicationScope 7. Run code, Stackoverflow Actual results: org.jboss.weld.interceptor.proxy.SimpleInterceptionChain.invokeNextInterceptor(SimpleInterceptionChain.java:69) 16:22:29,943 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8080-2) at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:112) 16:22:29,943 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8080-2) at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:88) 16:22:29,943 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8080-2) at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:55) 16:22:29,943 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8080-2) at org.cedj.geekseek.web.rest.core.test.integration.TestResource$Proxy$_$$_WeldSubclass.get(TestResource$Proxy$_$$_WeldSubclass.java) 16:22:29,943 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8080-2) at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source) 16:22:29,943 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8080-2) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 16:22:29,943 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8080-2) at java.lang.reflect.Method.invoke(Method.java:606) 16:22:29,943 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8080-2) at org.jboss.weld.interceptor.proxy.SimpleInterceptionChain.invokeNextInterceptor(SimpleInterceptionChain.java:85) 16:22:29,943 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8080-2) at org.jboss.weld.interceptor.proxy.InterceptorInvocationContext.proceed(InterceptorInvocationContext.java:127) 16:22:29,943 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8080-2) at org.cedj.geekseek.web.rest.core.interceptor.RESTInterceptorEnabler.intercept(RESTInterceptorEnabler.java:44) 16:22:29,943 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8080-2) at org.cedj.geekseek.web.rest.core.interceptor.RESTInterceptorEnabler$Proxy$_$$_WeldClientProxy.intercept(RESTInterceptorEnabler$Proxy$_$$_WeldClientProxy.java) 16:22:29,943 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8080-2) at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source) 16:22:29,944 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8080-2) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 16:22:29,944 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8080-2) at java.lang.reflect.Method.invoke(Method.java:606) 16:22:29,944 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8080-2) at org.jboss.weld.interceptor.proxy.SimpleMethodInvocation.invoke(SimpleMethodInvocation.java:30) 16:22:29,944 ERROR [stderr] (http-localhost.localdomain/127.0.0.1:8080-2) at org.jboss.weld.interceptor.proxy.SimpleInterceptionChain.invokeNextInterceptor(SimpleInterceptionChain.java:69) Expected results: Pr CDI spec: "An interceptor instance is a dependent object of the object it intercepts" So, Scoped Interceptors is defined as non-portable behavior. Deployment Validation Exception would help, since Weld can't handle it. Additional info: Arquillian based test case to demonstrate the problem: https://github.com/aslakknutsen/cdi-eap-interceptor-stackoverflow
Marko Lukša <marko.luksa> made a comment on jira WELD-1483 Pull request at https://github.com/weld/core/pull/351
Jozef Hartinger <jharting> made a comment on jira WELD-1483 Merged, please also create a PR for the master branch.
Looks like this fix was included in EAP 6.2 via Weld 1.1.15.Final. Setting to ON_QA.
Verified on EAP 6.2.0.CR3 (EAP_6.2.0.CR3-dev2).