2 Replies Latest reply on Feb 13, 2018 1:41 AM by Alexander Specht

    BSA 8.6.01 - blcli - trying to add an external command to a BLPackage

    Alexander Specht

      Hi all,


      I'm trying to add an external command to an empty BLPackage, but as soon as I'm providing some valid Unix command (e.g. ls), the blcli execution fails.

      Empty external commands can be added without problems.


      My commands


      blcli_execute BlPackage createEmptyPackage tstPkg "test package" $DepotBLPackageGroupID



      blcli_execute BlPackage getDBKeyByGroupAndName "/Workspace/alex_test/netstat_collector/BLPackages" "tstPkg"


      blcli_storeenv BlPackageDBKey

      Result: Empty Package created successfully


      Add an empty external command

      blcli_execute BlPackage addExternalCmdToEnd ${BlPackageDBKey} test_cmd01 "" "" Continue


      blcli_storeenv BlPackageDBKey


      Result – empty command added - shown also inside the console BLPackage


      Try to add an external command “/bin/ls”

      blcli_execute BlPackage addExternalCmdToEnd ${BlPackageDBKey} test_cmd02 "/bin/ls" "" Continue

      Error message

      Command execution failed. com.bladelogic.om.infra.mfw.util.BlException: Unfinished property reference

      No Update in the console


      based on the following link - How to add an external command from a local file?

      I tried to add the external command using:

      blcli_execute BlPackage addExternalCmdToEnd ${BlPackageDBKey} test_cmd02 "//@/bin/ls" "" Continue


      blcli_storeenv BlPackageDBKey


      The command returns without an error, but when trying to open the package in the console I'm getting the following error message


      Internal error loading package: org.xml.sax.SAXParseexception; lineNumber: 12;

      columnNumber: 16; An invalid XML character (Unicode: 0x2) was found in the element content of the document


      When checking the bldeploy.xml file, I also see these invalid characters


      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>


      <BLPACKAGE CreatedBy="uid=<my UserId>" CreatedDate="<creation_date>" SchemaVersion="2.0">

         <EXTERNALCMD ItemId="1">






         <EXTERNALCMD ItemId="2">








      Does someone already experienced similar behaviour ? How does the external command shall look like to be added successfully to the BLPackage.

      Appreciate any answers / hints!


      Many thanks