Ricardo_M_Wu 2017-06-24 06:30 采纳率: 33.3%
浏览 1576

dubbo消费者测试启动报错

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springservice': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.mixky.dubbo.dubbo_mid.IDemo. No provider available for the service com.mixky.dubbo.dubbo_mid.IDemo:1.0.0 from the url zookeeper://127.0.0.1:2181/com.alibaba.dubbo.registry.RegistryService?application=dubbo_consumer&dubbo=2.5.3&interface=com.mixky.dubbo.dubbo_mid.IDemo&methods=sayHello&pid=13084&revision=1.0.0&side=consumer&timestamp=1498285528059&version=1.0.0 to the consumer 192.168.0.184 use dubbo version 2.5.3
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:151)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:252)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:973)
at com.mixky.dubbo.dubbo_customer.ClientDemo.main(ClientDemo.java:15)
Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.mixky.dubbo.dubbo_mid.IDemo. No provider available for the service com.mixky.dubbo.dubbo_mid.IDemo:1.0.0 from the url zookeeper://127.0.0.1:2181/com.alibaba.dubbo.registry.RegistryService?application=dubbo_consumer&dubbo=2.5.3&interface=com.mixky.dubbo.dubbo_mid.IDemo&methods=sayHello&pid=13084&revision=1.0.0&side=consumer&timestamp=1498285528059&version=1.0.0 to the consumer 192.168.0.184 use dubbo version 2.5.3
at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:420)
at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:300)
at com.alibaba.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:138)
at com.alibaba.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:65)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:144)
... 6 more

  • 写回答

1条回答 默认 最新

  • 千杯不醉476 2017-06-25 02:11
    关注

    找不到生产者,反射不成功的错误。
    可能是添加并使用了接口,但是接口没有被注册,类比没有dubbo的spring就像bean没有配置好。
    所以建议你在dubbo的配置文件:spring-dubbo.xml(我的框架里是这个名字)里增加接口的注册。
    <
    dubbo:service
    ref
    ="demoService"
    interface
    ="com.unj.dubbotest.provider.DemoService"
    />
    前面是持久命名,后面是接口实现类

    评论

报告相同问题?

悬赏问题

  • ¥15 运筹学中在线排序的时间在线排序的在线LPT算法
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试,帮帮忙吧