2 Replies Latest reply on Dec 8, 2010 3:30 AM by Daniel Tharby

    getServerName returns nullPointer error ???!!!!????

    Daniel Tharby

      Hey All,

       

      Just started creating my first NSH script.... and now confused.

       

      I have got this

      Simple NSH Script

      #!/bin/nsh
      # Get creds and connect

      blcred cred -acquire -profile Profile1 -username BLAdmin -password password
      blcli_setoption serviceProfileName Profile1
      blcli_setoption roleName BLAdmins
      blcli_connect

      # Get Server Name
      blcli_execute Server getServerName
      blcli_storeenv HOSTN
      echo "Host is $HOSTN"

      blcli_disconnect
      exit


      When I run it I get java.lang.NullPointerException and also Cannot Store a Failed Command.

       

      This is to be part of a larger script, which I might hasten to add I have got working - except this part.


      Pointers on where I am going wrong !! btw this errors when running from and NSH prompt and via the GUI.

       

      Thanks

      Dan