4 Replies Latest reply on Oct 5, 2012 4:52 PM by Lazar NameToUpdate

    java.lang.NullPointerException while updating NSHScript Job parameter.

    Avikal Jain

      Folks, I am getting java.lang.NullPointerException while updating NSHScript Job parameter.

       

      blcli lets me to clear the parameters but while updating it throws the null exception, worth mentioning is that when I open the job I see the parameter value getting updated there.

       

      Here are the list of command and their results:

       

       

       

      C:\Users\avjain>blcli -v defaultProfile -r DBDPLY_ENG NSHScriptJob clearNSHScriptParameterValuesByGroupAndName /APPS/RMS-15116-XX/ATA_3_2012-09-27-22-37-39

      /UAT 0001__BL_COPY_DeployGESFeedBinaryFiles

      DBKey:SJobModelKeyImpl:2003002-1-2057704

      C:\Users\avjain>blcli -v defaultProfile -r DBDPLY_ENG NSHScriptJob addNSHScriptParameterValueByGroupAndName /APPS/RMS-15116-XX/ATA_3_2012-09-27-22-37-39/UA

      T 0001__BL_COPY_DeployGESFeedBinaryFiles 1 192.168.60.138

      Failed execution.java.lang.NullPointerException

       

      error.PNG

       

       

      Tried  to resolve the dbkey/name of the NSHScript Job and everything looks OK:

       

      C:\Users\avjain>blcli -v defaultProfile -r DBDPLY_ENG NSHScriptJob findJobKeyByGroupAndName /APPS/RMS-15116-XX/ATA_3_2012-09-27-22-37-39/UAT 0001__BL_COPY_

      DeployGESFeedBinaryFiles

      DBKey:SJobModelKeyImpl:2003002-1-2057704

      C:\Users\avjain>blcli -v defaultProfile -r DBDPLY_ENG NSHScriptJob getDBKeyByGroupAndName /APPS/RMS-15116-XX/ATA_3_2012-09-27-22-37-39/UAT 0001__BL_COPY_De

      ployGESFeedBinaryFiles

      DBKey:SJobModelKeyImpl:2003002-1-2057704

      C:\Users\avjain>blcli -v defaultProfile -r DBDPLY_ENG Job getJobNameByDBKey DBKey:SJobModelKeyImpl:2003002-1-2057704

      0001__BL_COPY_DeployGESFeedBinaryFiles

       

      BL version is 8.2.0.158 running on RHEL5.

       

      Any ideas?

        • 1. Re: java.lang.NullPointerException while updating NSHScript Job parameter.

          Parameter1 is specified as 0, parameter2 is specified as 1, and so on.

          When you clear parameters, you need to start from 0 (aka: first parameter)

           

          JOB_GROUP="/SandBox"
          JOB_NAME="TestNSHJob"

           

          VALUE1=ExistingValue1
          VALUE2=NewValue2

           

          blcli_execute NSHScriptJob
          clearNSHScriptParameterValuesByGroupAndName "$JOB_GROUP"
          "$JOB_NAME"
          blcli_execute NSHScriptJob
          addNSHScriptParameterValueByGroupAndName "$JOB_GROUP"
          "$JOB_NAME" 0 "$VALUE1"
          blcli_execute NSHScriptJob
          addNSHScriptParameterValueByGroupAndName "$JOB_GROUP"
          "$JOB_NAME" 1 "$VALUE2"

          • 2. Re: java.lang.NullPointerException while updating NSHScript Job parameter.
            Avikal Jain

            Changed my command to update the first parameter but no luck:

             

            C:\Users\avjain>blcli -v defaultProfile -r DBDPLY_ENG NSHScriptJob clearNSHScriptParameterValuesByGroupAndName /APPS/RMS-15116-XX/ATA_3_2012-09-27-22-37-39

            /UAT 0001__BL_COPY_DeployGESFeedBinaryFiles

            DBKey:SJobModelKeyImpl:2003002-1-2057704

            C:\Users\avjain>blcli -v defaultProfile -r DBDPLY_ENG NSHScriptJob addNSHScriptParameterValueByGroupAndName /APPS/RMS-15116-XX/ATA_3_2012-09-27-22-37-39/UA

            T 0001__BL_COPY_DeployGESFeedBinaryFiles 0 192.168.60.138

            Failed execution.java.lang.NullPointerException

             

            When i open the job post command execution I can see the value getting updated properly though but on prompt it gives the exception:

             

            error2.PNG

            • 3. Re: java.lang.NullPointerException while updating NSHScript Job parameter.

              ok, the value numbering had nothign to do this this (was thinking of a recent issue I was working on : )

               

              I reproduced, and this seems to be a defect with blcli, but performance blcli commands work.

               

              You can run this and should not get an error, run this from nsh (fill in your group, jobName, and value):

               

              blcred cred -acquire -profile defaultProfile -username USER -password PASS

               

              blcli_setoption serviceProfileName defaultProfile
              blcli_setoption roleName DBDPLY_ENG
              blcli_connect

               

              JOB_GROUP="/Test"
              JOB_NAME="Test"
              VALUE="Value"

               

              blcli_execute NSHScriptJob clearNSHScriptParameterValuesByGroupAndName "$JOB_GROUP" "$JOB_NAME"
              blcli_execute NSHScriptJob addNSHScriptParameterValueByGroupAndName "$JOB_GROUP" "$JOB_NAME" 1 "$VALUE"

              1 of 1 people found this helpful
              • 4. Re: java.lang.NullPointerException while updating NSHScript Job parameter.

                Avikal, did you have better luck with performance commands?

                 

                edit:

                Colleague actually just confirmed that this is a known defect, here's the number: QM001748206

                It pretty much confirms my test earlier (where blcli command fails, but performance commands work fine)

                1 of 1 people found this helpful