Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-7104

Inherited EJBs in JSF ManagedBeans are not being injected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • EAP_EWP 5.1.2 ER1
    • EAP_EWP 5.1.1
    • Web
    • None
    • JBoss Enterprise Application Platform 5.1.1
      JSF 1.2
      EJB3 1.3.7

    • Hide

      An example application is attached.
      1.Deploy it to EAP 5.1.1
      2.Access the Web Application at http://localhost:8080/TestEARWeb/

      EXPECTED:
      "Hello the Thing!" is printed to the browser

      ACTUAL:
      java.lang.NullPointerException
      com.redhat.gss.example.web.controller.AbstractController.getThing(AbstractController.java:19)

      Show
      An example application is attached. 1.Deploy it to EAP 5.1.1 2.Access the Web Application at http://localhost:8080/TestEARWeb/ EXPECTED: "Hello the Thing!" is printed to the browser ACTUAL: java.lang.NullPointerException com.redhat.gss.example.web.controller.AbstractController.getThing(AbstractController.java:19)
    • Hide

      Move one of the fields annotated with @EJB into the concreated ManagedBean. Alternatively if we add another annotation, such as @Resource, to the concrete class all the annotations from the subclass will also be processed.

      Show
      Move one of the fields annotated with @EJB into the concreated ManagedBean. Alternatively if we add another annotation, such as @Resource, to the concrete class all the annotations from the subclass will also be processed.
    • Hide
      The injection of @EJB or @Resource fields into superclasses of JSF Managed Bean were failing. When @EJB were to be injected via annotations, those annotations were not being processed, leaving their fields null, or otherwise unset. The cause of this issue has been resolved and these injections now work as expected.
      Show
      The injection of @EJB or @Resource fields into superclasses of JSF Managed Bean were failing. When @EJB were to be injected via annotations, those annotations were not being processed, leaving their fields null, or otherwise unset. The cause of this issue has been resolved and these injections now work as expected.
    • Documented as Resolved Issue
    • NEW

      When a JSF ManagedBean inherits EJB fields from a superclass, those EJBs are not being injected into the ManagedBean. If we place any annotation in the concrete ManagedBean implementation, then @EJB annotations from the superclass are picked up. For example if we move one of the fields annotated with @EJB into the concreated ManagedBean, or add a @Resource annotation, the problem does not occur.

              jaikiran Jaikiran Pai (Inactive)
              rhn-support-jshepher Jason Shepherd
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: