1 2 Previous Next 15 Replies Latest reply on Jun 15, 2012 3:18 AM by Pekka Tiittanen

    Creating a new complex command; running it generates an error

    Pekka Tiittanen

      Hi,

       

       

      Tried to create a complex command for the first time to fetch the username for the person who ran

       

       

      Command execution failed. com.bladelogic.om.infra.cli.factory.CommandLoadException: Failed to parse xml command file : /opt/bmc/BladeLogic/8.0/NSH/br/xml/cli/getJobRunUser-extra.xml: java.lang.Exception: Failed to parse file : /opt/bmc/BladeLogic/8.0/NSH/br/xml/cli/getJobRunUser-extra.xml

      Error was at line 95 and column 31: org.xml.sax.SAXParseException: The content of element type "complex_command" must match "(name,description,index?,example_list?,argument_list,commands_to_execute,return_type?)".

       

      So I probably have a mistake in the file, but can't at this point know what it might be.

       

      File contents is:

       

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

       

      <!DOCTYPE command_inventory SYSTEM "file://bladelogic.com/dtds/Command-Inventory.dtd">

       

          <command_inventory>

       

              <name_space name="JobRun">

       

              <complex_command command_id="getUserNameJobRun-0001" published="yes" release="yes">

       

                  <name>getJobRunUserName</name>

       

                      <description>

       

                          <author>Pekka Tiittanen</author>

       

                          <paragraph>

       

                              <string_literal/>

       

                          </paragraph>

       

                          <return_value_info/>

       

                      </description>

       

                      <argument_list>

       

                          <argument desc="Job run key " name="jobRunKey">com.bladelogic.om.infra.model.base.keys.DBKey</argument>

       

                      </argument_list>

       

                      <return_type>java.lang.String</return_type>

       

                      <commands_to_execute>

       

                          <command_invocation>

       

                              <namespace_ref>JobRun</namespace_ref>

       

                              <name>findJobResultKey</name>

       

                              <input>$jobRunKey$</input>

       

                              <store_result><name>jobResultKey</name></store_result>

       

                          </command_invocation>

       

                          <command_invocation>

       

                              <namespace_ref>Utility</namespace_ref>

       

                              <name>setTargetObject</name>

       

                              <input>jobResultKey</input>

       

                          </command_invocation>

       

                          <command_invocation>

       

                              <namespace_ref>JobRun</namespace_ref>

       

                              <name>getUserId</name>

       

                              <input></input>

       

                              <store_result><name>userId</name></store_result>

       

                          </command_invocation>

       

                          <command_invocation>

       

                              <namespace_ref>RBACUser</namespace_ref>

       

                              <name>findById</name>

       

                              <input>userId</input>

       

                          </command_invocation>

       

                          <command_invocation>

       

                              <namespace_ref>RBACUser</namespace_ref>

       

                              <name>getName</name>

       

                              <input></input>

       

                              <store_result><name>userName</name></store_result>

       

                          </command_invocation>

       

                      </commands_to_execute>

       

                  </complex_command>

       

              </name_space>

       

      </command_inventory>

        1 2 Previous Next