[dubbo] dubbo No provider available for the service


 

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" />

 

接口的路徑和名稱一定要完全相同,否則會拋出以上異常。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM