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

"Failed to create realm" with NullPointerException cause

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.0.0
    • Fix Version/s: 6.0.0, 5.5.2
    • Component/s: None
    • Labels:
      None
    • Needs backport:
      Yes
    • Needs QA verification:
      No
    • Functional tests:
      No
    • Are the reproduction steps defined?:
      Yes and I used the same an in the description

      Description

      Tests are occasionally getting:

      java.lang.RuntimeException: Failed to create realm
      	at com.forgerock.openam.functionaltest.api.Realm$Builder.create(Realm.java:399)
      	at com.forgerock.openam.functionaltest.api.Realm.create(Realm.java:255)
      

      With underlying AM error of:

      Caused by: java.lang.NullPointerException
      	at org.forgerock.openam.core.rest.sms.SmsRealmProvider.configureErrorMessage(SmsRealmProvider.java:166)
      	at org.forgerock.openam.core.rest.sms.SmsRealmProvider.handleCreate(SmsRealmProvider.java:552)
      

      This comes from the following:

          private ResourceException configureErrorMessage(final SMSException exception, String notFoundPath) {
      
              switch (exception.getErrorCode()) {
                  case "sms-REALM_NAME_NOT_FOUND":
                      // ...snip...
      

      And suggests that sometimes an SMSException is received with null for the error code. In order to discover the underlying reason, this NPE should be eliminated.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jamesphillpotts James Phillpotts
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: