glassfish
  1. glassfish
  2. GLASSFISH-14564

DOL fails to load appclient class during verification

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_b30
    • Component/s: verifier
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      14,564

      Description

      I just resurrected verifier in 3.1. To install verifier module, just unzip
      v3/packager/glassfish-verifier/target/glassfish-verifier.zip on top of your v3
      installation and chmod a+x bin/verifier.
      PFA an ear file that contains an ejb.jar and ejb-client.jar. ejb-client.jar is
      an appclient module and references the classes from ejb.jar, but there is no
      Class-Path reference to ejb.jar from ejb-client.jar. When I try to verify, it
      gives me:

      WARNING: Cannot load com.sun.fossdemo.Client reason : com.sun.fossdemo.Client
      java.lang.ClassNotFoundException: com.sun.fossdemo.Client
      at
      com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:808)
      at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:696)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      at
      com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:361)
      at
      com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:554)
      at
      com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:440)
      at
      com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:427)
      at
      com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:403)
      at
      com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:378)
      at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:243)
      at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:252)
      at
      com.sun.enterprise.deployment.archivist.ApplicationArchivist.readModulesDescriptors(ApplicationArchivist.java:628)
      at
      com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:255)
      at
      com.sun.enterprise.deployment.archivist.ApplicationArchivist.open(ApplicationArchivist.java:228)
      at
      com.sun.enterprise.deployment.archivist.ApplicationArchivist.open(ApplicationArchivist.java:80)
      at
      com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:165)
      at
      com.sun.enterprise.tools.verifier.DescriptorFactory.createApplicationDescriptor(DescriptorFactory.java:154)
      at com.sun.enterprise.tools.verifier.Verifier.initStandalone(Verifier.java:381)
      at com.sun.enterprise.tools.verifier.Verifier.init(Verifier.java:189)
      at com.sun.enterprise.tools.verifier.VerifierMain.main(VerifierMain.java:86)

      I can understand if there were a NoClassDefFoundError in the exception chain,
      but I only see ClassNotFoundException, so it seems to be a DOL issue to me.

        Activity

        Hide
        Sanjeeb Sahoo added a comment -

        Created an attachment (id=5394)
        Test case. Run "verifier app.ear"

        Show
        Sanjeeb Sahoo added a comment - Created an attachment (id=5394) Test case. Run "verifier app.ear"
        Hide
        Hong Zhang added a comment -

        Listen to the proper event to trigger verifier as part of the deployment (where
        the DOL processing is done, but before we switch to the application
        classloader).

        Show
        Hong Zhang added a comment - Listen to the proper event to trigger verifier as part of the deployment (where the DOL processing is done, but before we switch to the application classloader).
        Hide
        Sanjeeb Sahoo added a comment -

        Hong,

        The changes you checked in earlier is NOT applicable to standalone verifier -
        that's applicable to backend verifier only. So, I am reopening this issue,
        making it a verifier issue, taking ownership as it needs to be addressed by
        doing the following in verifier-impl/.../DescriptorFactory.java as suggested by
        you in email:

        context.addTransientAppMetaData(ExtendedDeploymentContext.IS_TEMP_CLASSLOADER,
        Boolean.TRUE);

        Show
        Sanjeeb Sahoo added a comment - Hong, The changes you checked in earlier is NOT applicable to standalone verifier - that's applicable to backend verifier only. So, I am reopening this issue, making it a verifier issue, taking ownership as it needs to be addressed by doing the following in verifier-impl/.../DescriptorFactory.java as suggested by you in email: context.addTransientAppMetaData(ExtendedDeploymentContext.IS_TEMP_CLASSLOADER, Boolean.TRUE);
        Hide
        Sanjeeb Sahoo added a comment -

        take ownership

        Show
        Sanjeeb Sahoo added a comment - take ownership
        Hide
        Sanjeeb Sahoo added a comment -

        ss141213@Sahoo:/space/ss141213/WS/gf/v3$ svn commit -m "Issue #14564: Set temp
        class loader flag during standalone verifier to be able to load appclient
        classes." verifier/
        Sending
        verifier/verifier-impl/src/main/java/com/sun/enterprise/tools/verifier/DescriptorFactory.java
        Transmitting file data .
        Committed revision 43044.

        Show
        Sanjeeb Sahoo added a comment - ss141213@Sahoo:/space/ss141213/WS/gf/v3$ svn commit -m "Issue #14564: Set temp class loader flag during standalone verifier to be able to load appclient classes." verifier/ Sending verifier/verifier-impl/src/main/java/com/sun/enterprise/tools/verifier/DescriptorFactory.java Transmitting file data . Committed revision 43044.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: