This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
If a POJO is injected using @Inject then the IDE shows the following warning message "Not enabled eligible for injection beans are found" This is incorrect and should be fixed.
What exactly is incorrect ?
A POJO can be injected as is, it is a direct target of injection. Why warning ?
There can be a number of reasons when typesafe resolution cannot find eligible for injection element: f.e. bean is disabled, has normal scope and is not proxyable . Please describe exact situation : - class with injected point - your POJO. I need all information to be able to reproduce this issue. POJO is not enough information .
POJO is: @Model public class CustomerName { private String value; public String getValue() { return value; } public void setValue(String value) { this.value = value; } } Injected in a stateless session bean as: @Stateless @LocalBean @Named @Path("/customers") public class CustomerSessionBean { @PersistenceContext EntityManager em; @Inject CustomerName name; List<Customer> cust; The last line gives the warning message.
@javax.enterprise.inject.Model' definition : @Named @RequestScoped @Stereotype @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME) public @interface Model {} So it is @RequestedScoped and CustomerName class has a normal scope. This is duplicate of issue #201825 *** This bug has been marked as a duplicate of bug 201825 ***
Thanks, that explains!