MyFaces CODI
  1. MyFaces CODI
  2. EXTCDI-28

CodiFacesContextWrapper in some scenarios throws a NPE because BeanManagerProvider hasn't yet been initialized

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0
    • Fix Version/s: 0.9.2
    • Component/s: JEE-JSF12-Module
    • Labels:
      None
    • Environment:
      Geronimo v3

      Description

      It seems that in some situations the CodiFacesContextWrapper constructor get's called before the BeanManagerProvider got initialized. In this case the constructor fails with a NullPointerException while getting the BeanManager.

        Activity

        Hide
        Mark Struberg added a comment - - edited

        sounds reasonable. I'll retest with geronimo3 again after I fixed the geronimo-openwebeans-plugin.
        My previous attempt was by packaging the owb jars inside my EAR. I need to test how this behaves with owb being provided directly by the container.

        Generally:
        When does CodiFacesContextWrapper get called, and is OWB alraedy up and running at this time?
        The faces-config.xml gets scanned at MyFaces startup when the FacesServlet gets started in web.xml.
        OWB typically gets started via a ServletContextListener#contextInitialized(). Since the Servlet spec defines to fire this method before any servlet gets started, all should work fine in theory.

        I'll dig deeper into geronimo3 and tomcat7 to see what's going on.

        Show
        Mark Struberg added a comment - - edited sounds reasonable. I'll retest with geronimo3 again after I fixed the geronimo-openwebeans-plugin. My previous attempt was by packaging the owb jars inside my EAR. I need to test how this behaves with owb being provided directly by the container. Generally: When does CodiFacesContextWrapper get called, and is OWB alraedy up and running at this time? The faces-config.xml gets scanned at MyFaces startup when the FacesServlet gets started in web.xml. OWB typically gets started via a ServletContextListener#contextInitialized(). Since the Servlet spec defines to fire this method before any servlet gets started, all should work fine in theory. I'll dig deeper into geronimo3 and tomcat7 to see what's going on.
        Hide
        Gerhard Petracek added a comment -

        it looks like an issue with geronimo. it works with: tomcat, jetty and glassfish.
        we might need EXTCDI-23 for implementing the additional scopes (orchestra uses something similar).

        Show
        Gerhard Petracek added a comment - it looks like an issue with geronimo. it works with: tomcat, jetty and glassfish. we might need EXTCDI-23 for implementing the additional scopes (orchestra uses something similar).
        Hide
        Mark Struberg added a comment -

        most pressing crash has been workaround, but I'm pretty sure this needs to be some adjustment still...

        Show
        Mark Struberg added a comment - most pressing crash has been workaround, but I'm pretty sure this needs to be some adjustment still...
        Hide
        Mark Struberg added a comment -

        To be more specific: this happens when I try to deploy my EE6 app with OpenWebBeans + MyFaces in Geronimo-3.0-M1.

        Show
        Mark Struberg added a comment - To be more specific: this happens when I try to deploy my EE6 app with OpenWebBeans + MyFaces in Geronimo-3.0-M1.

          People

          • Assignee:
            Unassigned
            Reporter:
            Mark Struberg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development