-
Bug
-
Resolution: Done
-
Major
-
2.1.1.Final
-
None
When validating whether a bean is passivation capable, org.jboss.weld.bootstrap.Validator uses the bean's bean manager for validating injection points of its interceptors, which can result in incorrect exception due to ambiguous dependency:
org.jboss.weld.exceptions.AmbiguousResolutionException: WELD-001318: Cannot resolve an ambiguous dependency between: - Managed Bean [class org.jboss.cdi.tck.tests.lookup.modules.interceptors.Dog] with qualifiers [@Any @Default], - Managed Bean [class org.jboss.cdi.tck.tests.lookup.modules.interceptors.Cat] with qualifiers [@Any @Default] at org.jboss.weld.manager.BeanManagerImpl.resolve(BeanManagerImpl.java:1181) at org.jboss.weld.bootstrap.Validator.validateInterceptors(Validator.java:221) at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:175) at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:504) at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68) at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_17] at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_17] ... 3 more
-> Class org.jboss.cdi.tck.tests.lookup.modules.interceptors.Cat is not (required to be) accessible to the module containing the interceptor class with injection point causing this exception.
Test case: org.jboss.cdi.tck.tests.lookup.modules.interceptors.InterceptorModularityTest