Errai, CDI, Netbeans warnings and beans.xml

486 views Asked by At

Is there any easy way to remove these nasty Netbeans warnings about "Unsatisfied dependency: no bean matches the injection point"? The problem is that the GWT and Errai packages do NOT contain beans.xml files and therefore do not contain activated beans because they do not qualify as bean archives.

Is there any way to "upgrade" these packages externally, ie. without rebuilding them or modifying them?

Errai seems to be non-compliant to JSR-299 in that regard.

Thanks in advance!

2

There are 2 answers

1
Mike Brock On BEST ANSWER

Yes, this is correct. Errai intentionally does not use beans.xml, instead relying on the presence of ErraiApp.properties to locate its own beans. This is because you don't want the CDI container discovering non-server-side beans.

See the note on this page of the docs: https://docs.jboss.org/author/display/ERRAI/Errai+CDI

0
Hillkorn On

Just create the beans.xml and let is empty as netbeans created it. I didn't found another way.