Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-1563

Failed CLI batch command with "deploy --force" for replace deployment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 3.0.0.Alpha2
    • 2.1.0.Final, 3.0.0.Alpha1
    • CLI
    • Hide

      1. %WILDFLY_HOME/bin/domain.sh

      2. vi deploy.cli
      batch
      deploy --force ./jboss-ejb-in-ear.ear
      run-batch

      3. jboss-cli.sh --connect --controller=127.0.0.1:9999 --user=admin --password=xxx --file="deploy.cli"
      The batch executed successfully

      4. jboss-cli.sh --connect --controller=127.0.0.1:9999 --user=admin --password=xxx --file="deploy.cli"
      Failed to handle 'run-batch': org.jboss.as.cli.CommandFormatException: Request is missing the address part.: Request is missing the address part.

      5. jboss-cli.sh --connect --controller=127.0.0.1:9999 --user=admin --password=xxx --file="deploy.cli"
      Failed to handle 'run-batch': org.jboss.as.cli.CommandFormatException: Request is missing the address part.: Request is missing the address part.

      Show
      1. %WILDFLY_HOME/bin/domain.sh 2. vi deploy.cli batch deploy --force ./jboss-ejb-in-ear.ear run-batch 3. jboss-cli.sh --connect --controller=127.0.0.1:9999 --user=admin --password=xxx --file="deploy.cli" The batch executed successfully 4. jboss-cli.sh --connect --controller=127.0.0.1:9999 --user=admin --password=xxx --file="deploy.cli" Failed to handle 'run-batch': org.jboss.as.cli.CommandFormatException: Request is missing the address part.: Request is missing the address part. 5. jboss-cli.sh --connect --controller=127.0.0.1:9999 --user=admin --password=xxx --file="deploy.cli" Failed to handle 'run-batch': org.jboss.as.cli.CommandFormatException: Request is missing the address part.: Request is missing the address part.
    • Workaround Exists
    • Hide

      Edit $WILDFLY_HOME/bin/jboss-cli.xml to skip validateRequest()
      from
      <validate-operation-requests>true</validate-operation-requests>
      to
      <validate-operation-requests>false</validate-operation-requests>

      Show
      Edit $WILDFLY_HOME/bin/jboss-cli.xml to skip validateRequest() from <validate-operation-requests>true</validate-operation-requests> to <validate-operation-requests>false</validate-operation-requests>
    • Low

      Using 'deploy --force' command on CLI batch mode fails and returns an error message: "Request is missing the address part."

      Command
       jboss-cli.sh --connect --controller=127.0.0.1:9999 --user=admin --password=xxx --file="deploy.cli"
      
      deploy.cli
      batch
      deploy --force ./jboss-ejb-in-ear.ear
      run-batch
      
      Full Error message

      Failed to handle 'run-batch': org.jboss.as.cli.CommandFormatException: Request is missing the address part.: Request is missing the address part.

      or

      The batch failed with the following error (you are remaining in the batch editing mode to have a chance to correct the error): Request is missing the address part.

      Expected message

      The batch executed successfully

      However, it's working in "WildFly 10 CLI interactive mode" and "JBoss AS 7 CLI batch" without error.

      There is no adding "address" key in buildDeploymentReplace() of DeployHandler like below.
      Even though on CLI batch mode it validates existence of "address" key in request with Util.validateRequest(), when 'run-batch' command execute in org.jboss.as.cli.handlers.batch.BatchRunHandler.doHandle()

      -------------------------------------------------------------------------------------------

      • First deploy: add by org.jboss.as.cli.handlers.DeployHandler.buildDeploymentAdd()
        {
            "operation" => "add",
            "address" => {"deployment" => "jboss-ejb-in-ear.ear"},
            "content" => [{"bytes" => bytes {
            ...
            }}]
        }
        

        -------------------------------------------------------------------------------------------

      • After deploy: replace by org.jboss.as.cli.handlers.DeployHandler.buildDeploymentReplace()
        {
            "operation" => "full-replace-deployment",
            "name" => "jboss-ejb-in-ear.ear",
            "enabled" => true,
            "content" => [{"bytes" => bytes {
            ...
            }}]
        }
        

        -------------------------------------------------------------------------------------------

      • Expected by org.jboss.as.cli.handlers.DeployHandler.buildDeploymentReplace()
        {
            "operation" => "full-replace-deployment",
            "name" => "jboss-ejb-in-ear.ear",
            "address" => [],
            "enabled" => true,
            "content" => [{"bytes" => bytes {
            ...
            }}]
        }
        

        -------------------------------------------------------------------------------------------

            rhn-support-jwon Ted Won
            rhn-support-jwon Ted Won
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: