Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-17812

"No bean is eligible for injection" warning for beans added in AfterBeanDiscovery

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • LATER
    • None
    • cdi-extensions
    • None

      JBDS shows No bean is eligible for injection to the injection point warning for injection points where the beans are provided by an extension in the ABD event:

      ByIdExtensionTest.java
      @Inject @ById("rbenevides") 
      private Person rafael;
      
      • shows No bean is eligible for injection to the injection point [JSR-299 §5.2.1]
      ByIdExtension.java
      public void afterBeanDiscovery(@Observes AfterBeanDiscovery abd, BeanManager bm) {
          for (final String idValue : ids) {
              BeanBuilder<Person> beanBuilder = new BeanBuilder<Person>(bm)
                      .beanClass(Person.class)
                      .types(Person.class, Object.
                      .qualifiers(new ByIdLiteral(idValue))
                      .beanLifecycle(new PersonContextualLifecycle(idValue));
              abd.addBean(beanBuilder.create());
          }
      }
      

            jmaury@redhat.com Jeff MAURY
            rsmeral Ron Šmeral (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: