您的位置:首页 > 大数据 > 人工智能

dubbo启动消费者报错:No provider available for the service

2016-08-01 17:01 1096 查看
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AsynchronousTaskController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.haj.service.HajFrontUserService com.haj.controller.app.AsynchronousTaskController.hajFrontUserService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hajFrontUserService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.haj.service.HajFrontUserService. No provider available for the service com.haj.service.HajFrontUserService from the url zookeeper://192.168.0.17:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=dubbo_consumer&check=false&dubbo=2.5.3&interface=com.haj.service.HajFrontUserService&methods=update,queryById,queryByCount,queryByList,add,getOrderCountByTime,getUserManagerList,getDao,updateUserCancelOrder,updateBySelective,delete,isUserByPhone,updateUserBalancePoints,getUserManagerById&pid=9076&revision=2.0.0&side=consumer×tamp=1470041682811 to the consumer 192.168.0.7 use dubbo version 2.5.3
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:434)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1882)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.haj.service.HajFrontUserService com.haj.controller.app.AsynchronousTaskController.hajFrontUserService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hajFrontUserService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.haj.service.HajFrontUserService. No provider available for the service com.haj.service.HajFrontUserService from the url zookeeper://192.168.0.17:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=dubbo_consumer&check=false&dubbo=2.5.3&interface=com.haj.service.HajFrontUserService&methods=update,queryById,queryByCount,queryByList,add,getOrderCountByTime,getUserManagerList,getDao,updateUserCancelOrder,updateBySelective,delete,isUserByPhone,updateUserBalancePoints,getUserManagerById&pid=9076&revision=2.0.0&side=consumer×tamp=1470041682811 to the consumer 192.168.0.7 use dubbo version 2.5.3
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
... 27 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hajFrontUserService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.haj.service.HajFrontUserService. No provider available for the service com.haj.service.HajFrontUserService from the url zookeeper://192.168.0.17:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=dubbo_consumer&check=false&dubbo=2.5.3&interface=com.haj.service.HajFrontUserService&methods=update,queryById,queryByCount,queryByList,add,getOrderCountByTime,getUserManagerList,getDao,updateUserCancelOrder,updateBySelective,delete,isUserByPhone,updateUserBalancePoints,getUserManagerById&pid=9076&revision=2.0.0&side=consumer×tamp=1470041682811 to the consumer 192.168.0.7 use dubbo version 2.5.3
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1523)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1120)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1044)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)
... 29 more
Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.haj.service.HajFrontUserService. No provider available for the service com.haj.service.HajFrontUserService from the url zookeeper://192.168.0.17:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=dubbo_consumer&check=false&dubbo=2.5.3&interface=com.haj.service.HajFrontUserService&methods=update,queryById,queryByCount,queryByList,add,getOrderCountByTime,getUserManagerList,getDao,updateUserCancelOrder,updateBySelective,delete,isUserByPhone,updateUserBalancePoints,getUserManagerById&pid=9076&revision=2.0.0&side=consumer×tamp=1470041682811 to the consumer 192.168.0.7 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:168)
... 37 more

八月 01, 2016 4:54:49 下午 org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart


遇到这个错误笔者也郁闷了好久,最后终于在 http://www.iteye.com/news/23850 这里找到了答案。原来是因为我服务提供者服务器没有添加20880例外端口,所以程序访问不到。要确定这个问题,大家可以使用 telnet 192.168.0.17 20880 看下端口通不通。

希望能帮到大家!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  dubbo
相关文章推荐