1

I have a problem deploying some proxy configuration in WSO2ESB. When I copy the proxy configuration file, even some Apache Synapse samples like sample 151, I get this error: "The 'name' attribute is required for a Proxy service definition".

The full stack trace is as follows:

wso2esb-4.6.0/repository/deployment/server/synapse-configs/default/proxy-services/synapse_sample_151.xml failed - Continue in fail-safe mode
org.apache.synapse.SynapseException: The 'name' attribute is required for a Proxy service definition
    at org.apache.synapse.config.xml.ProxyServiceFactory.handleException(ProxyServiceFactory.java:369)
    at org.apache.synapse.config.xml.ProxyServiceFactory.createProxy(ProxyServiceFactory.java:79)
    at org.apache.synapse.deployers.ProxyServiceDeployer.deploySynapseArtifact(ProxyServiceDeployer.java:58)
    at org.wso2.carbon.proxyadmin.ProxyServiceDeployer.deploySynapseArtifact(ProxyServiceDeployer.java:73)
    at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:172)
    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:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
Community
  • 1
  • 1
Saeed
  • 61
  • 7

2 Answers2

0

The issue is , if you directly deploying a proxy configuration to the "proxy " folder loaction, the proxy.xml and the proxy service name should be same. But if you try to create a proxy using proxy editor, you just give name, then system will craete proxy.xml automatically with the same name of the proxy service

Ratha
  • 9,434
  • 17
  • 85
  • 163
  • Thanks Ratha. But the name of the file is the same as the proxy name. I tried to deply cepSample.xml from this sample (http://wso2.org/library/articles/2011/07/complex-event-processing-business-rule-management-soa) and I got the same error. The proxy name is cepSample as well. – Saeed Mar 13 '13 at 11:55
  • There is no such a problem if I deploy this file in the Apache Synapse itself. But I want to use WSO2ESB instead. – Saeed Mar 13 '13 at 11:57
  • @Saeed if you check that cepSample.xml, which contains full synapse configuration that is, you can replace the current syanpse.xml and cahnge the name of the cepSample.xml to synapse.xml and keep in the exact deployment/server/default/syanpseconfig folder. Else, you can only pick the proxy configuartion and save it to another file with same name (ie: cepSample.xml), and deploy that in proxy folder. Better go to source view, and paste the proxy configuration/localentries one by one and see .In the sample, it conatins sequences,proxy,registry conf etc.. – Ratha Mar 13 '13 at 12:07
  • Thanks again Ratha. I just created a proxy service using the wizard (with the name cepSample), and after creation, I went to the code view, copied and pasted the code from the cepSample.xml file, and it gave me this error: "Proxy service requires a valid name". – Saeed Mar 13 '13 at 12:59
  • @Saeed after providing proxy name if you switch to source view, by default some configurations will be availble,whcih includes name, tarnasport.So, what you can do is copy target configuration of the proxy from this sample. These are simple things, which you can identify the xml tags and see which you need to add and omit. Or else, directly go to the ServiceBus menu-->Sourceview, it will list out the full synapse configuration, where paste your proxy configuration – Ratha Mar 13 '13 at 13:09
  • Thanks a lot Ratha. I did Service Bus menu-->Source view and it worked!! Thanks a million!! – Saeed Mar 13 '13 at 14:27
0

deploy into repository/deployment/server/default/synapseconfig/proxy and make sure all the necessary endpoints and sequences deployed into this

Faisal
  • 1,469
  • 2
  • 13
  • 25