Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: V3
    • Fix Version/s: V3
    • Component/s: cdi
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Macintosh

    • Issuezilla Id:
      10,192

      Description

      I've hit another classloader issue for ear deployment in Weld application. The
      gist of the problem is as follows.
      The ear container two modules:

      • jar (ejb)
      • war
        Both of these are 299 enabled modules.
        Our deployer.load() method gets called for each module.
        The jar module is handled first, and at that point, GlassFish
        DeploymentContext.getContextClassloader() is: EJBClassloader
        The war module is handled next, and the GlassFish
        DeploymentContext.getContextClassloader() is: WebappClassLoader

      After the deployer.load() method is called for these two modules (we listen for
      APPLICATION_LOADED event),
      we call WebBeansBootstrap.startContainer(). This internally adds EJBClassLoader
      to the internal store (TCCLSingletonProvider).

      After the application is deployed, and we attempt to visit the application
      (localhost:8080....), it's expecting a WebappClassLoader
      in this internal store - but only EJBClassLoader is there. We end up with the
      exception:

      WARNING: StandardContextValve[/webbeans-translator]: PWC1321: Error invoking
      requestInitialized method on ServletRequestListener
      org.jboss.webbeans.servlet.WebBeansListener
      java.lang.IllegalStateException: Singleton not set for WebappClassLoader
      (delegate=true; repositories=WEB-INF/classes/)
      at
      org.jboss.webbeans.bootstrap.api.helpers.TCCLSingletonProvider$TCCLSingleton.get(TCCLSingletonProvider.java:60)
      at org.jboss.webbeans.Container.instance(Container.java:52)
      at
      org.jboss.webbeans.servlet.WebBeansListener.requestInitialized(WebBeansListener.java:118)

      I would think that in this case, that internal store should contain two entries -
      onc for EJBClassLoader and one for WebappClassLoader.

        Activity

        Hide
        rogerk added a comment -

        Created an attachment (id=3496)
        Ear file

        Show
        rogerk added a comment - Created an attachment (id=3496) Ear file
        Hide
        Sanjeeb Sahoo added a comment -

        Starting.

        Show
        Sanjeeb Sahoo added a comment - Starting.
        Hide
        Sanjeeb Sahoo added a comment -

        Sending weld-integration/osgi.bundle
        Sending weld-integration/pom.xml
        Adding
        weld-integration/src/main/java/org/glassfish/weld/ACLSingletonProvider.java
        Sending weld-integration/src/main/java/org/glassfish/weld/WeldActivator.java
        Transmitting file data ....
        Committed revision 33360.

        Show
        Sanjeeb Sahoo added a comment - Sending weld-integration/osgi.bundle Sending weld-integration/pom.xml Adding weld-integration/src/main/java/org/glassfish/weld/ACLSingletonProvider.java Sending weld-integration/src/main/java/org/glassfish/weld/WeldActivator.java Transmitting file data .... Committed revision 33360.

          People

          • Assignee:
            Sanjeeb Sahoo
            Reporter:
            rogerk
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: