Failed to check the status of the service com.itheima.api.IPayService.的问题解答

问题描述:如下 启动了多个微服务 但是报这个异常

问题解决: 注意看报错 我启动的服务需要调用PayService接口 他说找不到
仔细一看 其实是自己对应的服务没有启动!!!!!!!!!!!!!

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'payController' defined in file [D:\work\myproject\shop\shop-pay-web\target\classes\com\itheima\shop\controller\PayController.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: payController; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.itheima.api.IPayService. No provider available for the service com.itheima.api.IPayService from the url registry://192.168.200.133:5001/com.alibaba.dubbo.registry.RegistryService?application=dubbo-pay-consumer&cluster=available&dubbo=2.6.0&pid=6844&refer=application%3Ddubbo-pay-consumer%26dubbo%3D2.6.0%26interface%3Dcom.itheima.api.IPayService%26methods%3DcallbackPayment%2CcreatePayment%26pid%3D6844%26register.ip%3D192.168.200.1%26side%3Dconsumer%26timestamp%3D1623292078499&registry=zookeeper&timestamp=1623292078528 to the consumer 192.168.200.1 use dubbo version 2.6.0
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:587) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
	at com.itheima.shop.PayWebApplication.main(PayWebApplication.java:12) [classes/:na]
Caused by: org.springframework.beans.factory.BeanCreationException: payController; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.itheima.api.IPayService. No provider available for the service com.itheima.api.IPayService from the url registry://192.168.200.133:5001/com.alibaba.dubbo.registry.RegistryService?application=dubbo-pay-consumer&cluster=available&dubbo=2.6.0&pid=6844&refer=application%3Ddubbo-pay-consumer%26dubbo%3D2.6.0%26interface%3Dcom.itheima.api.IPayService%26methods%3DcallbackPayment%2CcreatePayment%26pid%3D6844%26register.ip%3D192.168.200.1%26side%3Dconsumer%26timestamp%3D1623292078499&registry=zookeeper&timestamp=1623292078528 to the consumer 192.168.200.1 use dubbo version 2.6.0
	at com.alibaba.dubbo.spring.boot.DubboConsumerAutoConfiguration$1.postProcessBeforeInitialization(DubboConsumerAutoConfiguration.java:100) ~[dubbo-spring-boot-starter-2.0.0.jar:na]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:422) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1694) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:579) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	... 15 common frames omitted
Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.itheima.api.IPayService. No provider available for the service com.itheima.api.IPayService from the url registry://192.168.200.133:5001/com.alibaba.dubbo.registry.RegistryService?application=dubbo-pay-consumer&cluster=available&dubbo=2.6.0&pid=6844&refer=application%3Ddubbo-pay-consumer%26dubbo%3D2.6.0%26interface%3Dcom.itheima.api.IPayService%26methods%3DcallbackPayment%2CcreatePayment%26pid%3D6844%26register.ip%3D192.168.200.1%26side%3Dconsumer%26timestamp%3D1623292078499&registry=zookeeper&timestamp=1623292078528 to the consumer 192.168.200.1 use dubbo version 2.6.0
	at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:422) ~[dubbo-2.6.0.jar:2.6.0]
	at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:333) ~[dubbo-2.6.0.jar:2.6.0]
	at com.alibaba.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:163) ~[dubbo-2.6.0.jar:2.6.0]
	at com.alibaba.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:59) ~[dubbo-2.6.0.jar:2.6.0]
	at com.alibaba.dubbo.spring.boot.DubboConsumerAutoConfiguration$1.postProcessBeforeInitialization(DubboConsumerAutoConfiguration.java:89) ~[dubbo-spring-boot-starter-2.0.0.jar:na]
	... 18 common frames omitted
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值