Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.user.service.UserService. No provider available for the service com.user.service.UserService from the url zookeeper://localhost:2181/com.alibaba.dubbo.registry.RegistryService?application=userservice&dubbo=2.5.3&interface=com.user.service.UserService&methods=add&pid=39796&protocol=dubbo&side=consumer&timeout=15000&timestamp=1515132772468 to the consumer 10.100.130.245 use dubbo version 2.5.3

服务提供方:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://code.alibabatech.com/schema/dubbo
http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
<!--服务提供方服务信息-->
<dubbo:application name="userclient"/> <!--注册中心服务地址-->
<dubbo:registry id="zookeeper" protocol="zookeeper" address="${dubbo.registry.address}"/> <!--用dubbo协议在30001-->
<dubbo:protocol name="dubbo" port="20880" dispather="all" threadpool="cached" threads="5000"/>
<!--声明需要暴露的服务接口-->
<dubbo:service interface="com.user.service.UserService" ref="userService" version="1.0"
registry="zookeeper" owner="shp"/>
<!--具体服务接口实现-->
<bean id="userService" class="com.user.service.impl.userServiceImpl"/>
</beans> 消费者
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd"> <dubbo:application name="userservice"/> <dubbo:registry id="zookeeper" protocol="zookeeper" address="${dubbo.registry.address}"/>
<dubbo:reference id="userService" interface="com.user.service.UserService" protocol="dubbo" timeout="15000"/> </beans> 解决方案: 在 消费者配置文件 dubbo:reference 标签添加 version="1.0",解决。
<dubbo:reference version="1.0" id="userService" interface="com.user.service.UserService" protocol="dubbo" timeout="15000"/>

最新文章

  1. WCF传输图片解决方案
  2. Java中常用的查找算法——顺序查找和二分查找
  3. SQLServer安装错误之---&gt;无法打开项 UNKNOWN\Components\DA42BC89BF25F5BD0AF18C3B9B1A1EE8\c1c4f01781cc94c4c8fb1542c0981a2a
  4. oracle物化视图
  5. hdu 4582 树状DP
  6. objective-C 中两种实现动画的方法(转)
  7. mysql查询结果中文显示成了问号
  8. 在COM接口中不要使用同时出现只是大小写不同的名字作为属性名、函数名或者参数名
  9. jekyll bootstrap更改主题theme
  10. CSU1306:Manor(优先队列)
  11. C++标准库string
  12. spark运算结果写入hbase及优化
  13. QM3_Statistics Concepts and Market Returns
  14. GCC编译器原理(三)------编译原理三:编译过程---预处理
  15. SQLite 知识摘要 --- 事务
  16. 再谈数据库优化(database tuning)的真谛和误区
  17. Hsqldb中设置主键,并让主键自增
  18. CSSOM
  19. Backbone前端开发流程及规范
  20. Vue中把从后端取出的时间进行截取

热门文章

  1. 【hdu 6342】Expression in Memories
  2. MSMQ如何设置事务特性
  3. 浅析Context Class Loader
  4. cocos2d-x之浅析Hello World
  5. java old GC和young GC
  6. 杂项-项目管理:WBS(工作分解结构)
  7. extjs 与html相结合 自定义
  8. JVM源码分析之javaagent原理完全解读--转
  9. 小白向:web中利用request.getPart()上传文件到服务器
  10. solarwinds之监控路由器