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.

Bug 208335 - Injecting a POJO shows a warning message
Summary: Injecting a POJO shows a warning message
Status: RESOLVED DUPLICATE of bug 201825
Alias: None
Product: javaee
Classification: Unclassified
Component: CDI (show other bugs)
Version: 7.1
Hardware: PC All
: P3 normal (vote)
Assignee: Denis Anisimov
Depends on:
Reported: 2012-02-13 12:48 UTC by arungupta
Modified: 2012-02-13 13:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description arungupta 2012-02-13 12:48:01 UTC
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.
Comment 1 Denis Anisimov 2012-02-13 12:49:27 UTC
What exactly is incorrect ?
Comment 2 arungupta 2012-02-13 12:51:31 UTC
A POJO can be injected as is, it is a direct target of injection. Why warning ?
Comment 3 Denis Anisimov 2012-02-13 12:55:34 UTC
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 .
Comment 4 arungupta 2012-02-13 13:02:32 UTC
POJO is:

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:

public class CustomerSessionBean {

    EntityManager em;
    CustomerName name;
    List<Customer> cust;

The last line gives the warning message.
Comment 5 Denis Anisimov 2012-02-13 13:26:54 UTC
@javax.enterprise.inject.Model' definition :

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 ***
Comment 6 arungupta 2012-02-13 13:30:45 UTC
Thanks, that explains!