You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@deltaspike.apache.org by Rainer Schön <ra...@gmail.com> on 2014/06/23 19:24:51 UTC

CDI problem with the @Specializes annotation in jsf module

Hi all,

When I subclass JsfModuleConfig and annotate it with @Specializes I get a JBoss Tools CDI validator error, stating that my class does not qualify for specialization (Managed bean class annotated @Specializes must directly extend the bean class of another managed bean [JSR-299 §3.1.4]). Firstly I thought, this is a validation bug, but the bean effectively is not installed, when deployed. Finally I installed it by the @Alternative mechanism which does the trick. But I still wonder why this @Specializes should not work in this case. Did anyone have had a similar problem, using DS? I am using WELD as the CDI provider.

Thanks and regards
Rainer




Re: CDI problem with the @Specializes annotation in jsf module

Posted by Rainer Schön <ra...@gmail.com>.
Hello Mark

Thank you for your reply. There is really nothing else on the class path. I set up a small 'virgin' eclipse project to demonstrate the fact. The deployment to GF4 passes with no error or warning in the log, but the @Specialized bean is not installed and the validation error in the IDE persists. I really have no idea why this should not work. Maybe I have overseen something vital.

Regards, Rainer

Am 24.06.2014 05:04, schrieb Mark Struberg:
> Hi!
>
> Where did you do this?
> JsfModuleConfig is already specialized 2 times:
> * TestJsfModuleConfig in deltaspike-jsf-module-impl tests
>
> * PlaygroundJsfModuleConfig in examples/jsf-playground
>
> Maybe you have one of these in your classpath which confuses your tools?
>
> If not, it should work perfectly fine.
>
> LieGrue,
> strub
>
>
> On Monday, 23 June 2014, 19:25, Rainer Schön <ra...@gmail.com> wrote:
>
>
>>
>>
>> Hi all,
>>
>> When I subclass JsfModuleConfig and annotate it with @Specializes I get a JBoss Tools CDI validator error, stating that my class does not qualify for specialization (Managed bean class annotated @Specializes must directly extend the bean class of another managed bean [JSR-299 §3.1.4]). Firstly I thought, this is a validation bug, but the bean effectively is not installed, when deployed. Finally I installed it by the @Alternative mechanism which does the trick. But I still wonder why this @Specializes should not work in this case. Did anyone have had a similar problem, using DS? I am using WELD as the CDI provider.
>>
>> Thanks and regards
>> Rainer
>>
>>
>>
>>
>>

Re: CDI problem with the @Specializes annotation in jsf module

Posted by Mark Struberg <st...@yahoo.de>.
Hi!

Where did you do this?
JsfModuleConfig is already specialized 2 times:
* TestJsfModuleConfig in deltaspike-jsf-module-impl tests

* PlaygroundJsfModuleConfig in examples/jsf-playground

Maybe you have one of these in your classpath which confuses your tools?

If not, it should work perfectly fine.

LieGrue,
strub


On Monday, 23 June 2014, 19:25, Rainer Schön <ra...@gmail.com> wrote:
 

>
>
>Hi all,
>
>When I subclass JsfModuleConfig and annotate it with @Specializes I get a JBoss Tools CDI validator error, stating that my class does not qualify for specialization (Managed bean class annotated @Specializes must directly extend the bean class of another managed bean [JSR-299 §3.1.4]). Firstly I thought, this is a validation bug, but the bean effectively is not installed, when deployed. Finally I installed it by the @Alternative mechanism which does the trick. But I still wonder why this @Specializes should not work in this case. Did anyone have had a similar problem, using DS? I am using WELD as the CDI provider.
>
>Thanks and regards
>Rainer
>
>
>
>
>