Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-14565

AM Upgrade NPE when unable to read operational attrs from directory


    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s:, 7.0.0
    • Fix Version/s: 6.5.2, 7.0.0
    • Component/s: upgrade
    • Labels:
    • Target Version/s:
    • Sprint:
      AM Sustaining Sprint 60, AM Sustaining Sprint 61, AM Sustaining Sprint 62
    • Story Points:
    • Needs QA verification:
    • Functional tests:
    • Are the reproduction steps defined?:
      Yes and I used the same an in the description


      Bug description

      When performing an AM upgrade (e.g. 6.5.0 to and using DJ 6.5.0 with am-config production profile), the upgrade wizard fails to enable the Upgrade link on the first page.  Reviewing the amUpgrade logs reveals a NullPointerException...

      ERROR: Unable to read directory schema, the schema won't be upgraded
      No Results Returned: The entry ou=am-config does not include a subschemaSubentry attribute
      at org.forgerock.opendj.ldap.LdapException.newLdapException(LdapException.java:246)


      ERROR: An error occurred while initializing upgrade steps


              at org.forgerock.openam.upgrade.DirectoryContentUpgrader$UpgradeCTSToMultiValue.isUpgradeNecessary(DirectoryContentUpgrader.java:369)

              at org.forgerock.openam.upgrade.DirectoryContentUpgrader.<init>(DirectoryContentUpgrader.java:162)

      This is related to OPENAM-14333, but focussed at making the AM upgrade provide a more graceful failure/warning when it does not have read permission for operational attributes in the directory.

      How to reproduce the issue

      As per OPENAM-14333.

      Expected behaviour
      Upgrade should proceed successfully or a warning/error should be provided that better indicates the nature of the failure.
      Current behaviour
      The Upgrade link is greyed out and the amUpgrade logs provide the error information detailed above.

      Work around


      Code analysis

      The DirectoryContentUpgrader, line 369 does not have a null guard check in place, causing the NPE.  There are other places also within the same class that could benefit.  However, need to consider/test what will happen if this initialization does not fail and directory schema upgrade is required.




            • Assignee:
              lawrence.yarham Lawrence Yarham
              lawrence.yarham Lawrence Yarham
            • Votes:
              0 Vote for this issue
              4 Start watching this issue


              • Created: