com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method queryTemplate in the service com.x.api.service.query.evaluate.TemplateMessageService. No provider available for the service com.x.api.service.query.evaluate.TemplateMessageService from registry 192.168.11.32:2181 on the consumer 192.168.11.228 using the dubbo version 2.5.3. Please check if the providers have been started and registered. 网上有人说是因为实体没有实现Serializable 接口,但是我实现了呀,服务端和客户端的配置也没错,就是报这个错,很纠结,后来找总监看了下,他说是我路径的问题,有点懵,后来他说是服务端接口的路径,客户端的接口要和它一样否则就会找不到消息的提供者,就报了No provider available for the service com.x.api.service.query.evaluate.TemplateMessageService from registry 192.168.11.32:2181 on the consumer 192.168.11.228 using the dubbo versio错误。
项目中
<dubbo:reference interface="com.xwolf.dubbo.dao.HelloDao" id="helloDao"/>
<!-- 声明需要暴露的服务接口 -->
<dubbo:service interface="com.xwolf.dubbo.dao.HelloDao" ref="helloDaoImpl" />
接口的路径和名称一定要完全相同,否则会抛出以上异常。