[ https://issues.apache.org/jira/browse/OWB-865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13667393#comment-13667393 ]
Romain Manni-Bucau commented on OWB-865: ---------------------------------------- Hi you didnt specialized the producer method (redefining it in the child class) and abstract producers are supported (your case) so i don't see the issue. Did i miss sthg? > @Typed disables specializing class > ---------------------------------- > > Key: OWB-865 > URL: https://issues.apache.org/jira/browse/OWB-865 > Project: OpenWebBeans > Issue Type: Bug > Components: Inheritance, Specialization > Affects Versions: 1.2.1 > Reporter: Reinis Vicups > Attachments: specializes.zip > > > The SpecializedBarProducer @Specializes BaseBarProducer. > Now, annotating both classes with @Typed(Object.class) cause > SpecializedBarProducer beeing ignored (or in other words - the @Specializes > being ignored). See attached testcase BarTest. > If only BaseBarProducer is being annotated with @Typed(Object.class) > following excpetion is thrown: > org.apache.webbeans.exception.WebBeansDeploymentException: > org.apache.webbeans.exception.inject.InconsistentSpecializationException: > WebBean component class : de.orbitx.specializes.SpecializedBarProducer is not > enabled for specialized by the class > de.orbitx.specializes.SpecializedBarProducer class > at > org.apache.webbeans.config.BeansDeployer.checkSpecializations(BeansDeployer.java:709) > at > org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:188) > at > org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:182) > at > org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:158) > at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:43) > at > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:798) > at > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:612) > at > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:608) > at > org.apache.openejb.testing.ApplicationComposers.before(ApplicationComposers.java:580) > at > org.apache.openejb.testing.ApplicationComposers.evaluate(ApplicationComposers.java:664) > at > org.apache.openejb.junit.ApplicationComposer$DeployApplication.evaluate(ApplicationComposer.java:64) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) > at org.junit.runners.ParentRunner.run(ParentRunner.java:300) > at > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) > at > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) > Caused by: > org.apache.webbeans.exception.inject.InconsistentSpecializationException: > WebBean component class : de.orbitx.specializes.SpecializedBarProducer is not > enabled for specialized by the class > de.orbitx.specializes.SpecializedBarProducer class > at > org.apache.webbeans.util.WebBeansUtil.configureSpecializations(WebBeansUtil.java:784) > at > org.apache.webbeans.util.WebBeansUtil.configureSpecializations(WebBeansUtil.java:643) > at > org.apache.webbeans.config.BeansDeployer.checkSpecializations(BeansDeployer.java:700) > ... 25 more > All in all the behavior appears to me inconsistent, because either > - annotating both classes as @Typed shall not lead to ignoring the extending > class or > - annotating only the base class shall not lead to exception (since as I > understood the spec @Specializes shall inherit all annotations from the base > class); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira