Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-5332

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 7.1.0.DR2
    • 7.0.0.GA
    • CLI
    • DR1
    • 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>
    • 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"
      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.

      5. jboss-cli.sh --connect --controller=127.0.0.1:9999 --user=admin --password=xxx --file="deploy.cli"
      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.

      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" 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. 5. jboss-cli.sh --connect --controller=127.0.0.1:9999 --user=admin --password=xxx --file="deploy.cli" 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.

    Description

      Case: 01633809 - Error while deploying using JBoss CLI
      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

      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 "EAP 7 CLI interactive mode" and "EAP 6 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 {
            ...
            }}]
        }
        

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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: