-->

WSO2 Application server CarbonAppUploader will not

2019-09-09 03:18发布

问题:

I am trying to use CarbonAppUploader to deploy a carbon application on WSO2 Application Server. The service deploys the app as per log, but then complains if an artifact already exists. See below:

TID: [0] [AS] [2014-01-14 15:14:52,496] ERROR {org.wso2.carbon.application.deployer.CappAxis2Deployer} -  Error while deploying carbon application /...skip.../wso2as-5.1.0/repository/carbonapps/0/MY_ARTIFACT-1.0.1-SNAPSHOT.car {org.wso2.carbon.application.deployer.CappAxis2Deployer}
java.lang.Exception: Carbon Application : MY_ARTIFACT already exists. Two applications can't have the same Id. Deployment aborted.
        at org.wso2.carbon.application.deployer.internal.ApplicationManager.deployCarbonApp(ApplicationManager.java:219)
        at org.wso2.carbon.application.deployer.CappAxis2Deployer.deploy(CappAxis2Deployer.java:72)
        at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
        at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:810)
        at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
        at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
        at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
        at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)
        at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
        at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
        at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment(CarbonDeploymentSchedulerTask.java:67)
        at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:112)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:722)

回答1:

Please check whether you have deployed another CAR file with the same name but a different version. This error is thrown when you have 2 CAR files with same artifact name which is MY_ARTIFACT in this case but with different versions.

Please note that WSO2 Carbon Servers still do not have the multiple CAR file versioning.

Thanks and Regards,

Harshana