glassfish
  1. glassfish
  2. GLASSFISH-3790

Admin Console cannot load class when deploying Connector Module

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 9.1pe
    • Fix Version/s: 9.1peur1
    • Component/s: jca
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: PC

    • Issuezilla Id:
      3,790
    • Status Whiteboard:
      Hide

      91ur1Approved

      Show
      91ur1Approved

      Description

      When deploying a Connector Module to Glassfish through Admin Console, it would
      fail to configure the Connector Module because Admin Console is unable to load
      class needed by Connector Module. Same deployment is successful when using
      commandline "asadmin deploy <file_name>".

      The reason is because for our Connector Module, we put the classes required by
      Connector Module inside jars in "glassfish/domains/domain1/lib" directory.
      This is legal, since this is the Commmon Classloader as defined by Glassfish
      Classloader hierachy, Connector Module would delegate classloading to its
      parent Classloader, which is the Common Classloader.

      However, when Admin Console is deploying the Connector Module, after the first
      deployment step, in the next step it would attempt to configure the resource-
      adapter-class bean as defined in ra.xml of Connector Module. In order to do
      this, Admin Console will try to load the this resource-adapter-class. However
      Admin Console does not use the Glassfish Classloader hierachy to load the
      class, instead it uses "com.sun.enterprise.connectors.util.RARUtils" to load
      the class, and this helper class only tries to load from jars inside the
      Connector Module archive and jars under "glassfish/lib" directory. It ignores
      the "domain1/lib" directory, thus it would catch
      java.lang.ClassNotFoundException at line 105 of RARUtils, and log a harmless
      message in server.log such as

      [#|2007-10-19T18:45:55.433-0700|INFO|sun-
      appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=20;_ThreadName=
      httpWorkerThread-4848-
      0;|com.stc.connector.framework.jca.system.STCResourceAdapter|#]

      However, this would not work for us, since we would like to have the Admin
      Console to deploy the Connector Module and configure the adapter-class. Admin
      Console needs to use the same Classloading hierachy as Glassfih container to
      try to load this adapter-class.

        Activity

        Hide
        Sivakumar Thyagarajan added a comment -

        We shall fix this issue for 9.1 UR1 to handle such usecases. However please note
        that this usecase is non-portable and may not work on other application servers.
        I have also raised an RFE 3808 to add support for --libraries in standalone
        connector modules.

        Show
        Sivakumar Thyagarajan added a comment - We shall fix this issue for 9.1 UR1 to handle such usecases. However please note that this usecase is non-portable and may not work on other application servers. I have also raised an RFE 3808 to add support for --libraries in standalone connector modules.
        Hide
        Sivakumar Thyagarajan added a comment -

        Jagadish will check in the fix into UR1.

        Show
        Sivakumar Thyagarajan added a comment - Jagadish will check in the fix into UR1.
        Show
        Sivakumar Thyagarajan added a comment - Fixed this issue in GFv2 UR1. Changeset: http://fisheye5.cenqua.com/changelog/glassfish?cs=SJSAS91_UR1_BRANCH:sivakumart:20071030104243
        Show
        Sivakumar Thyagarajan added a comment - Fixed this issue in GFv2 UR1. Changeset: http://fisheye5.cenqua.com/changelog/glassfish?cs=SJSAS91_UR1_BRANCH:sivakumart:20071030104243
        Hide
        Jagadish added a comment -

        Evaluation for V3 :
        Not applicable as the use-case works fine (taken care of) in v3.

        Show
        Jagadish added a comment - Evaluation for V3 : Not applicable as the use-case works fine (taken care of) in v3.

          People

          • Assignee:
            Jagadish
            Reporter:
            edwardchou
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: