Details

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

      WinXP

      Description

      On GFv2.1.1 verifier reports the problems clearly:

      WARNING: This bean [MyEjb] has no ejb reference by the name of [...]
      SEVERE: "DPL8006: get/add descriptor failure : ejb-ref TO ..."
      SEVERE: "DPL8007: Invalid Deployment Descriptors element jndi-name value ..."
      WARNING: This bean [MyEjb] has no resource reference by the name of [...]
      SEVERE: "DPL8007: Invalid Deployment Descriptors element jndi-name value ..."

      On GFv3.1b33 it reports:

      Error Name : Could not verify successfully.
      Error Description : java.lang.NullPointerException

      at java.util.Hashtable.get(Hashtable.java:334)

      at com.sun.enterprise.security.acl.RoleMapperFactory.getRoleMapper(RoleMapperFactory.java:118)

        Activity

        Hide
        Hong Zhang added a comment -

        I have just checked in the fix for the app name.
        I am not sure why PND uses thread context classloader to load the class, probably because there is no other easy way to access the classloader from the descriptor class? I think this class is like this since 8.*.
        The deployment classloader (not the final application classloader) used by the verifier code has all the module URLs to it, so it should have access to all the necessary classes..

        Show
        Hong Zhang added a comment - I have just checked in the fix for the app name. I am not sure why PND uses thread context classloader to load the class, probably because there is no other easy way to access the classloader from the descriptor class? I think this class is like this since 8.*. The deployment classloader (not the final application classloader) used by the verifier code has all the module URLs to it, so it should have access to all the necessary classes..
        Hide
        Sanjeeb Sahoo added a comment -

        Just because the class existed like that since 8.x does not mean it can't be a bug. Anyway, I am reluctant to fix it in verifier, because I don't believe we can rely on having a single classloader for the entire app during verification, as that does not work when the same class name appears in multiple isolated modules in the same ear.

        Show
        Sanjeeb Sahoo added a comment - Just because the class existed like that since 8.x does not mean it can't be a bug. Anyway, I am reluctant to fix it in verifier, because I don't believe we can rely on having a single classloader for the entire app during verification, as that does not work when the same class name appears in multiple isolated modules in the same ear.
        Hide
        Hong Zhang added a comment -

        But don't we use this single classloader as the classloader for the DOL parsing part of verification anyways? Maybe we could use this classloader as the context classloader for the DOL parsing part, but not the rest of the verification? Will that be ok?
        Yeah, it will be better to use the actual classloader to load the class in PND instead of the thread context classloader, but looking at the code, it will be non-trivial to pass in the actual classloader to the Descriptor class..

        Show
        Hong Zhang added a comment - But don't we use this single classloader as the classloader for the DOL parsing part of verification anyways? Maybe we could use this classloader as the context classloader for the DOL parsing part, but not the rest of the verification? Will that be ok? Yeah, it will be better to use the actual classloader to load the class in PND instead of the thread context classloader, but looking at the code, it will be non-trivial to pass in the actual classloader to the Descriptor class..
        Hide
        Hong Zhang added a comment -

        I have talked with Sahoo and he is still not comfortable setting the context classloader in the verifier for this part of the code. So we will need to revisit this in the future release (the changes to make the Descriptor class be able to access the classloader are quite involving).

        Show
        Hong Zhang added a comment - I have talked with Sahoo and he is still not comfortable setting the context classloader in the verifier for this part of the code. So we will need to revisit this in the future release (the changes to make the Descriptor class be able to access the classloader are quite involving).
        Hide
        Hong Zhang added a comment -

        Fixed the NPE in loading principal class for the verifier code path.

        Show
        Hong Zhang added a comment - Fixed the NPE in loading principal class for the verifier code path.

          People

          • Assignee:
            Hong Zhang
            Reporter:
            Dies Koper
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: