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

[GSS](7.0.z) Failed CLI batch command with "deploy --force" for replace deployment

XMLWordPrintable

    • 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.
    • EAP 7.0.6

      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 {
            ...
            }}]
        }
        

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

            pjurak Petr Jurak (Inactive)
            rhn-support-jwon Ted Won
            Peter Mackay Peter Mackay
            Peter Mackay Peter Mackay
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: