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

Upgrade causes NullPointerException while initializing upgrade steps



    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 7.2.0
    • 2021.7, 7.2.0
    • upgrade
    • Rank:
    • AM Sustaining Sprint 86
    • 2
    • Yes
    • No
    • Yes and I used the same an in the description



      Performing an upgrade from 6.5.2 to 7.2.0 snapshot results in 
      ERROR: An error occurred while initializing upgrade steps
      java.lang.NullPointerException: null
      Reproduction steps:

      1. Deployed two instances of AM, http://idp.amtest2.com:9080/access and http://sp.amtest2.com:7080/access. Both have embedded config and user stores, port ranges for idp are 59xxx and for sp 57xxx.
      2. On IdP, top level realm, created hosted Identity Provider, left signing cert empty, specified new COT of test_idp and mail -> mail for attribute mapping.
      3. On SP, top level realm, created hosted SP, new COT of test_sp.
      4. Using exportmetadata url for SP, created remote SP in IdP, specified the same attribute mapping as for the IdP, adding the entity to the same COT
      5. Using exportmetadata url for IdP, created remote IdP in SP, adding the entry to the same COT.
      6. For demo user on both IdP and SP, added email address of demo@example.com.
      7. Using http://sp.amtest2.com:7080/access/saml2/jsp/spSSOInit.jsp?idpEntityID=http://idp.amtest2.com:9080/access&metaAlias=/sp, login as demo on both IdP and SP and verify that single sign on completes successfully.
      1. Stop both IdP and SP and replace war with 7.2.0 snapshot war.
      2. Restart both IdP and SP and attempt to navigate to the the url of each. 

      Expected behaviour

      The upgrade page will be displayed and the link to upgrade to 7.2.0-snapshot will be enabled.

      Current behaviour

      The upgrade page is displayed but the upgrade link remains greyed out.

      In the amUpgrade logs, the following is reported:

      o.f.o.u.UpgradeServices: 2021-05-26 12:23:01,594: Thread[http-nio-7080-exec-8]: TransactionId[b0d9a15e-8fcd-4b61-b17c-13943026265d-195]
      ERROR: An error occurred while initializing upgrade steps
      java.lang.NullPointerException: null
      [CONTINUED]     at com.sun.identity.shared.xml.XMLUtils.getChildNode(XMLUtils.java:445)
      [CONTINUED]     at com.sun.identity.sm.ServiceSchemaModifications.getAttributes(ServiceSchemaModifications.java:169)
      [CONTINUED]     at com.sun.identity.sm.ServiceSchemaModifications.fetchExistingServiceAttributes(ServiceSchemaModifications.java:498)
      [CONTINUED]     at com.sun.identity.sm.ServiceSchemaModifications.parseExistingServiceDefinition(ServiceSchemaModifications.java:130)
      [CONTINUED]     at com.sun.identity.sm.ServiceSchemaModifications.<init>(ServiceSchemaModifications.java:70)
      [CONTINUED]     at org.forgerock.openam.upgrade.steps.UpgradeServiceSchemaStep.diffServiceVersions(UpgradeServiceSchemaStep.java:135)
      [CONTINUED]     at org.forgerock.openam.upgrade.steps.UpgradeServiceSchemaStep.initialize(UpgradeServiceSchemaStep.java:117)
      [CONTINUED]     at org.forgerock.openam.upgrade.UpgradeServices.<init>(UpgradeServices.java:100)


        Issue Links



              lawrence.yarham Lawrence Yarham
              lawrence.yarham Lawrence Yarham
              0 Vote for this issue
              3 Start watching this issue