java.lang.IllegalArgumentException: Error handling command: deploy /var/jenkins_home/jobs/Project/workspace/myproject/target/test.war

Jenkins JIRA | Benjamin Schueller | 1 year ago
  1. 0

    I have a war file which is not directly in the workspace directory. (WAR/EAR files = "myproject/target/test.war") The first build is correct. Previously there is no deployment on wildfly and afterwards i can access my deployed war. But the second build runs on a problem. It seems that the deployed war is not recognized. The deployment breaks with following message: {{java.lang.IllegalArgumentException: Error handling command: deploy /var/jenkins_home/jobs/Project/workspace/myproject/target/test.war at org.jboss.as.cli.scriptsupport.CLI.cmd(CLI.java:189) at org.jenkinsci.plugins.wildfly.WildflyBuilder.perform(WildflyBuilder.java:166) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:919) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:870) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1741) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Caused by: org.jboss.as.cli.CommandFormatException: 'test.war' already exists in the deployment repository (use --force to replace the existing content in the repository). at org.jboss.as.cli.handlers.DeployHandler.doHandle(DeployHandler.java:422) at org.jboss.as.cli.handlers.CommandHandlerWithHelp.handle(CommandHandlerWithHelp.java:88) at org.jboss.as.cli.impl.CommandContextImpl.handle(CommandContextImpl.java:614) at org.jboss.as.cli.scriptsupport.CLI.cmd(CLI.java:186) ... 10 more}} I had a look at the sourcecode. Maybe in WildflyBuilder.applicationExists the deploy-info response is checked against the complete war file definition (with directory) and the deploy-info just returns the war-file name.

    Jenkins JIRA | 1 year ago | Benjamin Schueller
    java.lang.IllegalArgumentException: Error handling command: deploy /var/jenkins_home/jobs/Project/workspace/myproject/target/test.war
  2. 0

    I have a war file which is not directly in the workspace directory. (WAR/EAR files = "myproject/target/test.war") The first build is correct. Previously there is no deployment on wildfly and afterwards i can access my deployed war. But the second build runs on a problem. It seems that the deployed war is not recognized. The deployment breaks with following message: {{java.lang.IllegalArgumentException: Error handling command: deploy /var/jenkins_home/jobs/Project/workspace/myproject/target/test.war at org.jboss.as.cli.scriptsupport.CLI.cmd(CLI.java:189) at org.jenkinsci.plugins.wildfly.WildflyBuilder.perform(WildflyBuilder.java:166) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:919) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:870) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1741) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Caused by: org.jboss.as.cli.CommandFormatException: 'test.war' already exists in the deployment repository (use --force to replace the existing content in the repository). at org.jboss.as.cli.handlers.DeployHandler.doHandle(DeployHandler.java:422) at org.jboss.as.cli.handlers.CommandHandlerWithHelp.handle(CommandHandlerWithHelp.java:88) at org.jboss.as.cli.impl.CommandContextImpl.handle(CommandContextImpl.java:614) at org.jboss.as.cli.scriptsupport.CLI.cmd(CLI.java:186) ... 10 more}} I had a look at the sourcecode. Maybe in WildflyBuilder.applicationExists the deploy-info response is checked against the complete war file definition (with directory) and the deploy-info just returns the war-file name.

    Jenkins JIRA | 1 year ago | Benjamin Schueller
    java.lang.IllegalArgumentException: Error handling command: deploy /var/jenkins_home/jobs/Project/workspace/myproject/target/test.war
  3. 0

    GitHub comment 6067#38245588

    GitHub | 3 years ago | wildfly-ci
    org.jboss.as.cli.CommandFormatException: {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "JBAS018785: There is already a deployment called SimpleServlet.war with the same runtime name SimpleServlet.war"}}
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 6067#38245588

    GitHub | 3 years ago | wildfly-ci
    org.jboss.as.cli.CommandFormatException: {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "JBAS018785: There is already a deployment called SimpleServlet.war with the same runtime name SimpleServlet.war"}}
  6. 0

    GitHub comment 5435#28010122

    GitHub | 3 years ago | wildfly-ci
    org.jboss.as.cli.CommandFormatException: You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.jboss.as.cli.CommandFormatException

      'test.war' already exists in the deployment repository (use --force to replace the existing content in the repository).

      at org.jboss.as.cli.handlers.DeployHandler.doHandle()
    2. JBoss Application Server: Command line interface
      CLI.cmd
      1. org.jboss.as.cli.handlers.DeployHandler.doHandle(DeployHandler.java:422)
      2. org.jboss.as.cli.handlers.CommandHandlerWithHelp.handle(CommandHandlerWithHelp.java:88)
      3. org.jboss.as.cli.impl.CommandContextImpl.handle(CommandContextImpl.java:614)
      4. org.jboss.as.cli.scriptsupport.CLI.cmd(CLI.java:186)
      4 frames