fang qiang created SCB-699: ------------------------------ Summary: 会用local注册中心的时候,无报找不到服务的schema定义 Key: SCB-699 URL: https://issues.apache.org/jira/browse/SCB-699 Project: Apache ServiceComb Issue Type: Bug Components: Java-Chassis Affects Versions: java-chassis-1.0.0-m2 Reporter: fang qiang Attachments: image-2018-06-26-19-11-26-692.png
在samples下面使用auth-sample的配置本地mock注册中心方式, System.setProperty("local.registry.file", "xxx/src\\main\\resources\\register.yaml"); register.yaml {code:java} //代码占位符 auth-provider: - id: "001" version: "0.0.1" appid: auth-sample #调试的服务id instances: - endpoints: - rest://127.0.0.1:8080 {code} 同时在resource下面放了契约文件。 !image-2018-06-26-19-11-26-692.png! 启动consumer报错: {code:java} 2018-06-26 19:04:04,889 [INFO] add microserviceVersion, appId=auth-sample, microserviceName=auth-provider, version=0.0.1, versionRule=0.0.1. org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersionRule.addMicroserviceVersion(MicroserviceVersionRule.java:89) 2018-06-26 19:04:04,891 [INFO] set instances, appId=auth-sample, microserviceName=auth-provider, versionRule=0.0.1, instanceId=ced13ef2-f181-49db-a3a7-5d6996e3a278, version=0.0.1, endpoints=[rest://127.0.0.1:8080]. org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersionRule.lambda$setInstances$0(MicroserviceVersionRule.java:161) Exception in thread "main" java.lang.Error: no schema defined for auth-sample:auth-provider at org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.createRequestMeta(CseClientHttpRequest.java:157) at org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.execute(CseClientHttpRequest.java:138) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:660) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:621) at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:388) at org.apache.servicecomb.provider.springmvc.reference.RestTemplateWrapper.postForObject(RestTemplateWrapper.java:113) at org.apache.servicecomb.samples.auth.consumer.AuthConsumerMain.main(AuthConsumerMain.java:44) {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)