Loading

How to solve HTTP Status 409 Error when re-deploying a mule application through Mule Maven Plugin

Дата публикации: Mar 2, 2024
Решение

SYMPTOM

You're trying to re-deploy an existing application through the Mule Maven Plugin, using a version < 2.2.1, by running it standalone or using Jenkins or any other continuous integration tooling set.  

The deploy ends up in error. 
While verifying the mule maven plugin log, you are able to identify the following exception:

[INFO]
[INFO] --- mule-maven-plugin:2.1.1:deploy (default-cli) @ myapp ---
[INFO] No application configured. Using project artifact: /home/mule/.jenkins/jobs/myapp/workspace/myapp/target/myapp-2.1.0.zip
[INFO] Deploying application myapp
[INFO] Found application myapp. Undeploying application...
[INFO] Deploying application...
[ERROR] Failed: 409 Conflict: {"message":"This target has an application with the same name already deployed. Please delete it in order to create a new deployment."}
[ERROR] Failed to deploy myapp: Failed to deploy application myapp
org.mule.tools.maven.plugin.mule.DeploymentException: Failed to deploy application myapp
        at org.mule.tools.maven.plugin.mule.arm.ArmDeployer.deploy(ArmDeployer.java:73)
        at org.mule.tools.maven.plugin.mule.DeployMojo.deployWithDeployer(DeployMojo.java:213)
        at org.mule.tools.maven.plugin.mule.DeployMojo.arm(DeployMojo.java:196)
        at org.mule.tools.maven.plugin.mule.DeployMojo.doExecute(DeployMojo.java:173)
        at org.mule.tools.maven.plugin.mule.AbstractMuleMojo.execute(AbstractMuleMojo.java:176)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)


 

CAUSE

This is caused by a problem in Mule Maven Plugin on versions under 2.2.1, which causes a failure when trying to un-deploy the existing application on Mule, failing while doing so.


SOLUTION

Upgrade your Mule Maven Plugin to 2.2.1 or later, where this problem is already solved.
 
Номер статьи базы знаний

001118466

 
Загрузка
Salesforce Help | Article