netbeansjavabeanscdierraijsr299

Errai, CDI, Netbeans warnings and beans.xml


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!


Solution

  • 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