title: WSO2 developer studio making car file faulty on deployment
body: <p>I am using WSO2 Developer studio 3.7.0 to deploy my ESB project on to the carbon server. But every time i deploy it WSO2 ESB makes my CAR file <strong>faulty</strong>. On the developer studio side there is no error. It shows build successful and deployment successful too. </p>
  
  <p><strong>Note:</strong></p>
  
  <p>I am using WSO2 ESB 4.8.1 and WSO2 developer studio 3.7.0. I am using apache maven. </p>
  
  <p><strong>My CAR project "pom.xml".</strong>   </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.example.Template_CAR&lt;/groupId&gt;
    &lt;artifactId&gt;Template_CAR&lt;/artifactId&gt;
    &lt;version&gt;1.0.0&lt;/version&gt;
    &lt;packaging&gt;carbon/application&lt;/packaging&gt;
    &lt;name&gt;Template_CAR&lt;/name&gt;
    &lt;description&gt;Template_CAR&lt;/description&gt;
    &lt;distributionManagement&gt;
      &lt;repository&gt;
        &lt;id&gt;local&lt;/id&gt;
        &lt;url&gt;file:/home/omerkhalid/Documents/&lt;/url&gt;
      &lt;/repository&gt;
    &lt;/distributionManagement&gt;
    &lt;properties&gt;
      &lt;maven.car.deploy.skip&gt;false&lt;/maven.car.deploy.skip&gt;
      &lt;com.example.Template_ESB.template_._HelloWorldLogger&gt;capp/EnterpriseServiceBus&lt;/com.example.Template_ESB.template_._HelloWorldLogger&gt;
      &lt;com.example.Template_ESB.proxy-service_._TemplateService&gt;capp/EnterpriseServiceBus&lt;/com.example.Template_ESB.proxy-service_._TemplateService&gt;
      &lt;artifact.types&gt;jaggery/app=zip,service/rule=aar,lib/library/bundle=jar,synapse/message-processors=xml,synapse/endpointTemplate=xml,synapse/proxy-service=xml,synapse/message-store=xml,carbon/application=car,registry/resource=zip,lib/dataservice/validator=jar,synapse/endpoint=xml,web/application=war,synapse/sequence=xml,synapse/configuration=xml,lib/registry/handlers=jar,synapse/task=xml,service/meta=xml,webapp/jaxws=war,synapse/api=xml,cep/bucket=xml,bpel/workflow=zip,lib/registry/filter=jar,service/dataservice=dbs,synapse/local-entry=xml,synapse/priority-executor=xml,synapse/event-source=xml,synapse/template=xml,lib/carbon/ui=jar,service/axis2=aar,synapse/sequenceTemplate=xml,wso2/gadget=dar,lib/synapse/mediator=jar&lt;/artifact.types&gt;
    &lt;/properties&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.example.Template_ESB.proxy-service&lt;/groupId&gt;
        &lt;artifactId&gt;TemplateService&lt;/artifactId&gt;
        &lt;version&gt;1.0.0&lt;/version&gt;
        &lt;type&gt;xml&lt;/type&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.example.Template_ESB.template&lt;/groupId&gt;
        &lt;artifactId&gt;HelloWorldLogger&lt;/artifactId&gt;
        &lt;version&gt;1.0.0&lt;/version&gt;
        &lt;type&gt;xml&lt;/type&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
    &lt;repositories&gt;
      &lt;repository&gt;
        &lt;releases&gt;
          &lt;enabled&gt;true&lt;/enabled&gt;
          &lt;updatePolicy&gt;daily&lt;/updatePolicy&gt;
          &lt;checksumPolicy&gt;ignore&lt;/checksumPolicy&gt;
        &lt;/releases&gt;
        &lt;id&gt;wso2-nexus&lt;/id&gt;
        &lt;url&gt;http://maven.wso2.org/nexus/content/groups/wso2-public/&lt;/url&gt;
      &lt;/repository&gt;
      &lt;repository&gt;
        &lt;id&gt;wso2-maven2-repository-1&lt;/id&gt;
        &lt;url&gt;http://dist.wso2.org/maven2&lt;/url&gt;
      &lt;/repository&gt;
      &lt;repository&gt;
        &lt;id&gt;wso2-nexus-repository-1&lt;/id&gt;
        &lt;url&gt;http://maven.wso2.org/nexus/content/groups/wso2-public/&lt;/url&gt;
      &lt;/repository&gt;
    &lt;/repositories&gt;
    &lt;pluginRepositories&gt;
      &lt;pluginRepository&gt;
        &lt;releases&gt;
          &lt;enabled&gt;true&lt;/enabled&gt;
          &lt;updatePolicy&gt;daily&lt;/updatePolicy&gt;
          &lt;checksumPolicy&gt;ignore&lt;/checksumPolicy&gt;
        &lt;/releases&gt;
        &lt;id&gt;wso2-nexus&lt;/id&gt;
        &lt;url&gt;http://maven.wso2.org/nexus/content/groups/wso2-public/&lt;/url&gt;
      &lt;/pluginRepository&gt;
      &lt;pluginRepository&gt;
        &lt;id&gt;wso2-maven2-repository-1&lt;/id&gt;
        &lt;url&gt;http://dist.wso2.org/maven2&lt;/url&gt;
      &lt;/pluginRepository&gt;
      &lt;pluginRepository&gt;
        &lt;id&gt;wso2-nexus-repository-1&lt;/id&gt;
        &lt;url&gt;http://maven.wso2.org/nexus/content/groups/wso2-public/&lt;/url&gt;
      &lt;/pluginRepository&gt;
    &lt;/pluginRepositories&gt;
    &lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.9&lt;/version&gt;
          &lt;configuration&gt;
            &lt;buildcommands /&gt;
            &lt;projectnatures&gt;
              &lt;projectnature&gt;org.wso2.developerstudio.eclipse.distribution.project.nature&lt;/projectnature&gt;
            &lt;/projectnatures&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.wso2.maven&lt;/groupId&gt;
          &lt;artifactId&gt;maven-car-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.0.9&lt;/version&gt;
          &lt;extensions&gt;true&lt;/extensions&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;id&gt;car&lt;/id&gt;
              &lt;phase&gt;package&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;car&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
          &lt;configuration /&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.wso2.maven&lt;/groupId&gt;
          &lt;artifactId&gt;maven-car-deploy-plugin&lt;/artifactId&gt;
          &lt;version&gt;1.0.9&lt;/version&gt;
          &lt;extensions&gt;true&lt;/extensions&gt;
          &lt;configuration&gt;
            &lt;carbonServers&gt;
              &lt;CarbonServer&gt;
                &lt;trustStorePath&gt;/home/omerkhalid/Documents/WSO2/wso2esb-4.8.1/repository/resources/security/wso2carbon.jks&lt;/trustStorePath&gt;
                &lt;trustStorePassword&gt;wso2carbon&lt;/trustStorePassword&gt;
                &lt;trustStoreType&gt;JKS&lt;/trustStoreType&gt;
                &lt;serverUrl&gt;https://localhost:9443&lt;/serverUrl&gt;
                &lt;userName&gt;admin&lt;/userName&gt;
                &lt;password&gt;admin&lt;/password&gt;
                &lt;operation&gt;deploy&lt;/operation&gt;
              &lt;/CarbonServer&gt;
            &lt;/carbonServers&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>Exception on WSO2 ESB Management Console</strong>
  <img src="https://i.stack.imgur.com/xc8sQ.png" alt="WSO2 ESB Run Time Management Console"></p>
  
  <p><strong>Fault Reason:</strong></p>
  
  <pre><code> org.apache.axis2.deployment.DeploymentException: ProxyService Deployment from the file : /home/omerkhalid/Documents/WSO2/wso2esb-4.8.1/repository/carbonapps/work/1422113107556Template_CAR_1.0.0.car/TemplateService_1.0.0/TemplateService-1.0.0.xml : Failed. at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:211) at org.wso2.carbon.application.deployer.synapse.SynapseAppDeployer.deployArtifacts(SynapseAppDeployer.java:100) at org.wso2.carbon.application.deployer.internal.ApplicationManager.deployCarbonApp(ApplicationManager.java:251) at org.wso2.carbon.application.deployer.CappAxis2Deployer.deploy(CappAxis2Deployer.java:114) at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807) 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:79) at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:124) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) 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:744) Caused by: org.apache.axis2.deployment.DeploymentException: ProxyService Deployment from the file : /home/omerkhalid/Documents/WSO2/wso2esb-4.8.1/repository/carbonapps/work/1422113107556Template_CAR_1.0.0.car/TemplateService_1.0.0/TemplateService-1.0.0.xml : Failed. at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:199) ... 20 more Caused by: org.apache.synapse.deployers.SynapseArtifactDeploymentException: ProxyService Deployment from the file : /home/omerkhalid/Documents/WSO2/wso2esb-4.8.1/repository/carbonapps/work/1422113107556Template_CAR_1.0.0.car/TemplateService_1.0.0/TemplateService-1.0.0.xml : Failed. at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.handleSynapseArtifactDeploymentError(AbstractSynapseArtifactDeployer.java:473) at org.apache.synapse.deployers.ProxyServiceDeployer.deploySynapseArtifact(ProxyServiceDeployer.java:97) at org.wso2.carbon.proxyadmin.ProxyServiceDeployer.deploySynapseArtifact(ProxyServiceDeployer.java:46) at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:192) ... 20 more Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:658) at org.apache.synapse.config.xml.ValueFactory.isDynamicKey(ValueFactory.java:124) at org.apache.synapse.config.xml.ValueFactory.createValue(ValueFactory.java:59) at org.apache.synapse.config.xml.InvokeMediatorFactory.buildParameters(InvokeMediatorFactory.java:77) at org.apache.synapse.config.xml.InvokeMediatorFactory.createSpecificMediator(InvokeMediatorFactory.java:62) at org.apache.synapse.config.xml.AbstractMediatorFactory.createMediator(AbstractMediatorFactory.java:91) at org.apache.synapse.config.xml.MediatorFactoryFinder.getMediator(MediatorFactoryFinder.java:223) at org.apache.synapse.config.xml.AbstractListMediatorFactory.addChildren(AbstractListMediatorFactory.java:41) at org.apache.synapse.config.xml.SequenceMediatorFactory.createAnonymousSequence(SequenceMediatorFactory.java:70) at org.apache.synapse.config.xml.ProxyServiceFactory.createProxy(ProxyServiceFactory.java:178) at org.apache.synapse.deployers.ProxyServiceDeployer.deploySynapseArtifact(ProxyServiceDeployer.java:56) ... 22 more 
  </code></pre>