我在esb终端方面遇到如下错误,我做了很多事情,比如重命名文件......所以我也没有得到任何东西。
错误 - ProxyServiceFactory目标是代理服务定义所必需的。
警告 - ProxyServiceDeployer代理服务热部署来自文件:/home/aa/Downloads/jack/LatestVersion/wso2esb-4.6.0/repository/deployment/server/synapse-configs/default/proxy-services/readings.xml失败 - 以故障安全模式继续
org.apache.synapse.SynapseException:代理服务定义需要Target at org.apache.synapse.config.xml.ProxyServiceFactory.handleException(ProxyServiceFactory.java:369) 在org.apache.synapse.config.xml.ProxyServiceFactory.createProxy(ProxyServiceFactory.java:220) at org.apache.synapse.deployers.ProxyServiceDeployer.deploySynapseArtifact(ProxyServiceDeployer.java:58) 在org.wso2.carbon.proxyadmin.ProxyServiceDeployer.deploySynapseArtifact(ProxyServiceDeployer.java:73) at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:172) 在org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136) 在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) 在org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254) at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371) 在org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59) 在org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67) 在org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment(CarbonDeploymentSchedulerTask.java:67) 在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) 在java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.access $ 201(ScheduledThreadPoolExecutor.java:165) at java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267) 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615) 在java.lang.Thread.run(Thread.java:679)
答案 0 :(得分:0)
代理服务应至少包含一个Insequence或Endpoint或两者。确保您的文件至少具有以下基本格式,该格式使用空的序列。
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="ProxyName"
transports="https http"
startOnLoad="true"
trace="disable">
<description/>
<target>
<inSequence/>
</target>
</proxy>
答案 1 :(得分:0)
我看到一个分号“;”在您的代理配置中。你可以删除并试试吗?就在名字之前
<proxy xmlns="ws.apache.org/ns/synapse";
name="insertreadings"
transports="https http"
startOnLoad="true"
trace="disable">
答案 2 :(得分:0)
由于没有在代理服务定义上正确设置名称空间,因此您遇到了上述错误。
您可以按如下方式添加命名空间(使用“http://”):
xmlns="http://ws.apache.org/ns/synapse"
答案 3 :(得分:0)
按如下方式修复配置后尝试:
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="insertreadings"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<description/>
<target>
<inSequence/>
<outSequence>
<drop/>
</outSequence>
</target>
</proxy>