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

NPE during export-svc-cfg

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 14.5.1
    • Fix Version/s: None
    • Component/s: ssoadm
    • Labels:
      None
    • Environment:
      Upgraded from 13.5.0 to 5.5.1
    • Needs backport:
      No
    • Support Ticket IDs:
    • Needs QA verification:
      No
    • Functional tests:
      No
    • Are the reproduction steps defined?:
      No (add reasons in the comment)

      Description

      Bug description

      Using the out of the box 13.5.0 and nothing else, upgrade 13.5.0 to 5.5.1. Now install the ssoadm that comes with 5.5.1 and do a export-svc-cfg. This fails with NullPointerException

       

       _$ ssoadm export-svc-cfg -u amadmin -f ws/install-app/pass.txt -e xxxxxxxxx -o export-551-from-upgrade.xml  -v|_
       
       _Process Request ..._
       _Constructing Request Context..._
       _Validating mandatory options..._
       _Processing Sub Command ..._
       
       _Executing class, com.sun.identity.cli.schema.ExportServiceConfiguration._
       _Authenticating..._
       _Authenticated._
       _com.sun.identity.cli.CLIException: java.lang.NullPointerException_
               _at com.sun.identity.cli.schema.ExportServiceConfiguration.handleRequest(ExportServiceConfiguration.java:122)_
               _at com.sun.identity.cli.SubCommand.execute(SubCommand.java:296)_
               _at com.sun.identity.cli.CLIRequest.process(CLIRequest.java:217)_
               _at com.sun.identity.cli.CLIRequest.process(CLIRequest.java:139)_
               at com.sun.identity.cli.CommandManager.serviceRequestQueue(CommandManager.java:585)
                at com.sun.identity.cli.CommandManager.<init>(CommandManager.java:182)
               at com.sun.identity.cli.CommandManager.main(CommandManager.java:159)
       Caused by: java.lang.NullPointerException
               at com.sun.identity.sm.ServiceManager.checkAndEncryptPasswordSyntax(ServiceManager.java:1095)
               at com.sun.identity.sm.ServiceSchemaManagerImpl.toXML(ServiceSchemaManagerImpl.java:682)
               at com.sun.identity.sm.ServiceSchemaManager.toXML(ServiceSchemaManager.java:966)
               at com.sun.identity.sm.ServiceManager.toXML(ServiceManager.java:1356)
               at com.sun.identity.cli.schema.ExportServiceConfiguration.handleRequest(ExportServiceConfiguration.java:86)
               ... 6 more

      How to reproduce the issue

      Details steps outlining how to recreate the issue (remove this text)

      1. Using the out of the box 13.5.0 and nothing else, upgrade 13.5.0 to 5.5.1. Now install the ssoadm that comes with 5.5.1 and do a export-svc-cfg. This fails with NullPointerException_
      Expected behaviour
      ssoadm export-svc-cfg succeed,when using a clean 5.5.1 the export work. It just that if this is upgraded from 13.5.x the export fails.
      
      Current behaviour
      export-svc-cfg fails with NPE thrown
      

      Work around

      None. (other than edit the scripting schema) to add "

       <ServicesConfiguration><Service name="ScriptingService" version="1.0"><Schema i18nFileName="scripting" i18nKey="service-description" resourceName="scripting" revisionNumber="1" serviceHierarchy="/DSAMEConfig/ScriptingService">
       <Global hideConfigUI="no" validate="yes">
       <AttributeSchema hideConfigUI="no" i18nKey="g101" name="defaultScriptContext" order="900" resourceName="defaultContext" type="single_choice">
       <ChoiceValues>
      
      ServiceManager.java
      
      /* SUGGESTED FIX (swap the condition )
      if ((AttributeSchema.Syntax.PASSWORD.toString()).equals(syntax)) {
      */
                  if (syntax.equals(AttributeSchema.Syntax.PASSWORD.toString())) {
                      if (debug.messageEnabled()) {
                          debug.message("ServiceManager: encrypting password syntax");
                      }
      
      

      The scripting.xml or the upgrade maybe good to add syntax="string" to the

       <AttributeSchema hideConfigUI="no" i18nKey="g101" name="defaultScriptContext" order="900" resourceName="defaultContext" type="single_choice">
       <ChoiceValues>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                adam.heath Adam Heath
                Reporter:
                chee-weng.chea C-Weng C
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: