Failed to check the status of the service com.itheima.api.IPayService.的问题解答 淡淡的烟草味﹌ 2022-10-06 00:39 109阅读 0赞 问题描述:如下 启动了多个微服务 但是报这个异常 问题解决: 注意看报错 我启动的服务需要调用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®istry=zookeeper×tamp=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®istry=zookeeper×tamp=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®istry=zookeeper×tamp=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
还没有评论,来说两句吧...