dubbo rest服务(消费者) java.lang.ClassNotFoundException: org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine 错误问题
1、版本
dubbo 2.7.3
2、描述
java.lang.ClassNotFoundException: org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine
2019-07-26 20:16:59,572 [main] ERROR [org.apache.dubbo.registry.integration.RegistryDirectory] - [DUBBO] Failed to refer invoker for interface:interface boazy.dubbo.demo.api.RestUserService,url:(rest://10.198.0.10:8083/boazy.dubbo.demo.api.RestUserService?anyhost=true&application=boazy-dubbo-demo-consumer&bean.name=boazy.dubbo.demo.api.RestUserService&check=false&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=boazy.dubbo.demo.api.RestUserService&lazy=false&methods=registerUser,queryUser&owner=boazy&pid=14208&protocol=rest&qos.port=33333®ister=true®ister.ip=10.198.0.10&release=2.7.3&remote.application=boazy-dubbo-demo-provider&server=jetty&side=consumer&sticky=false×tamp=1564143395915)org/jboss/resteasy/client/jaxrs/engines/ApacheHttpClient4Engine, dubbo version: 2.7.3, current host: 10.198.0.10
java.lang.NoClassDefFoundError: org/jboss/resteasy/client/jaxrs/engines/ApacheHttpClient4Engine
at org.apache.dubbo.rpc.protocol.rest.RestProtocol.doRefer(RestProtocol.java:180)
at org.apache.dubbo.rpc.protocol.AbstractProxyProtocol.protocolBindingRefer(AbstractProxyProtocol.java:99)
at org.apache.dubbo.rpc.protocol.AbstractProtocol.refer(AbstractProtocol.java:91)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:130)
at org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:72)
at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:71)
at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java)
at org.apache.dubbo.registry.integration.RegistryDirectory.toInvokers(RegistryDirectory.java:423)
at org.apache.dubbo.registry.integration.RegistryDirectory.refreshInvoker(RegistryDirectory.java:280)
at org.apache.dubbo.registry.integration.RegistryDirectory.refreshOverrideAndInvoker(RegistryDirectory.java:239)
at org.apache.dubbo.registry.integration.RegistryDirectory.notify(RegistryDirectory.java:233)
at org.apache.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:418)
at org.apache.dubbo.registry.support.FailbackRegistry.doNotify(FailbackRegistry.java:369)
at org.apache.dubbo.registry.support.FailbackRegistry.notify(FailbackRegistry.java:360)
at org.apache.dubbo.registry.zookeeper.ZookeeperRegistry.doSubscribe(ZookeeperRegistry.java:183)
at org.apache.dubbo.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:295)
at org.apache.dubbo.registry.integration.RegistryDirectory.subscribe(RegistryDirectory.java:172)
at org.apache.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:411)
at org.apache.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:392)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:128)
at org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:70)
at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:69)
at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java)
at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:396)
at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:329)
at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:250)
at org.apache.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:73)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:170)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1640)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1080)
at boazy.dubbo.demo.consumer.ConsumerApp.main(ConsumerApp.java:56)
Caused by: java.lang.ClassNotFoundException: org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 34 more
2019-07-26 20:16:59,588 [main] ERROR [org.apache.dubbo.registry.integration.RegistryDirectory] - urls to invokers error .invokerUrls.size :1, invoker.size :0. urls :[rest://10.198.0.10:8083/boazy.dubbo.demo.api.RestUserService?anyhost=true&application=boazy-dubbo-demo-provider&bean.name=boazy.dubbo.demo.api.RestUserService&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=boazy.dubbo.demo.api.RestUserService&methods=registerUser,queryUser&owner=boazy&pid=17996®ister=true&release=2.7.3&server=jetty&side=provider×tamp=1564143395915]
java.lang.IllegalStateException: urls to invokers error .invokerUrls.size :1, invoker.size :0. urls :[rest://10.198.0.10:8083/boazy.dubbo.demo.api.RestUserService?anyhost=true&application=boazy-dubbo-demo-provider&bean.name=boazy.dubbo.demo.api.RestUserService&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=boazy.dubbo.demo.api.RestUserService&methods=registerUser,queryUser&owner=boazy&pid=17996®ister=true&release=2.7.3&server=jetty&side=provider×tamp=1564143395915]
at org.apache.dubbo.registry.integration.RegistryDirectory.refreshInvoker(RegistryDirectory.java:292)
at org.apache.dubbo.registry.integration.RegistryDirectory.refreshOverrideAndInvoker(RegistryDirectory.java:239)
at org.apache.dubbo.registry.integration.RegistryDirectory.notify(RegistryDirectory.java:233)
at org.apache.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:418)
at org.apache.dubbo.registry.support.FailbackRegistry.doNotify(FailbackRegistry.java:369)
at org.apache.dubbo.registry.support.FailbackRegistry.notify(FailbackRegistry.java:360)
at org.apache.dubbo.registry.zookeeper.ZookeeperRegistry.doSubscribe(ZookeeperRegistry.java:183)
at org.apache.dubbo.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:295)
at org.apache.dubbo.registry.integration.RegistryDirectory.subscribe(RegistryDirectory.java:172)
at org.apache.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:411)
at org.apache.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:392)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:128)
at org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:70)
at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:69)
at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java)
at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:396)
at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:329)
at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:250)
at org.apache.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:73)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:170)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1640)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1080)
at boazy.dubbo.demo.consumer.ConsumerApp.main(ConsumerApp.java:56)
restUserService invoking error.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restUserService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service boazy.dubbo.demo.api.RestUserService. No provider available for the service boazy.dubbo.demo.api.RestUserService from the url zookeeper://10.198.0.21:2181/org.apache.dubbo.registry.RegistryService?anyhost=true&application=boazy-dubbo-demo-consumer&bean.name=boazy.dubbo.demo.api.RestUserService&check=false&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=boazy.dubbo.demo.api.RestUserService&lazy=false&methods=registerUser,queryUser&owner=boazy&pid=14208&protocol=rest&qos.port=33333®ister=true®ister.ip=10.198.0.10&release=2.7.3&remote.application=boazy-dubbo-demo-provider&server=jetty&side=consumer&sticky=false×tamp=1564143418650 to the consumer 10.198.0.10 use dubbo version 2.7.3
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:177)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1640)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1080)
at boazy.dubbo.demo.consumer.ConsumerApp.main(ConsumerApp.java:56)
Caused by: java.lang.IllegalStateException: Failed to check the status of the service boazy.dubbo.demo.api.RestUserService. No provider available for the service boazy.dubbo.demo.api.RestUserService from the url zookeeper://10.198.0.21:2181/org.apache.dubbo.registry.RegistryService?anyhost=true&application=boazy-dubbo-demo-consumer&bean.name=boazy.dubbo.demo.api.RestUserService&check=false&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=boazy.dubbo.demo.api.RestUserService&lazy=false&methods=registerUser,queryUser&owner=boazy&pid=14208&protocol=rest&qos.port=33333®ister=true®ister.ip=10.198.0.10&release=2.7.3&remote.application=boazy-dubbo-demo-provider&server=jetty&side=consumer&sticky=false×tamp=1564143418650 to the consumer 10.198.0.10 use dubbo version 2.7.3
at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:418)
at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:329)
at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:250)
at org.apache.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:73)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:170)
... 6 more
3、解决
是 resteasy-client 版本过高引起的问题
resteasy-client 4.x.x 版本中无 ApacheHttpClient4Engine 类,4.x.x版本中叫 ApacheHttpClient43Engine 类
resteasy-client 3.8.x 版本中有ApacheHttpClient4Engine类
将 resteasy-client 4.x.x 换成 resteasy-client 3.8.x 版本,就可以解决上面的问题咯...
dubbo rest服务(消费者) java.lang.ClassNotFoundException: org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine 错误问题的更多相关文章
- Caused by: java.lang.ClassNotFoundException: org.jboss.logging.BasicLogger
1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help ...
- SpringCloud使用Feign出现java.lang.ClassNotFoundException: org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory异常
废话不多说!!! 在SpringCloud项目中配置了Feign来调用restful接口,项目启动的时候报错,报错信息如下: 找不到org.springframework.cloud.client.l ...
- Tomcat中使用commons-io-2.5发生的错误java.lang.ClassNotFoundException: org.apache.commons.io.IOUtils
关键词:IntelliJ IDEA.Tomcat.commons-io-2.5.jar.java.lang.ClassNotFoundException: org.apache.commons.io. ...
- Hibenate错误汇总:java.lang.NoClassDefFoundError: org/jboss/logging/BasicLogger
转自:https://bioubiou.iteye.com/blog/1769950 1 Hibenate异常汇总:java.lang.NoClassDefFoundError: org/jboss/ ...
- dubbo启动报java.lang.ClassNotFoundException: javassist.ClassPath
原文: dubbo启动报java.lang.ClassNotFoundException: javassist.ClassPath 在dubbo启动的过程中报错误:java.lang. ...
- Caused by: java.lang.ClassNotFoundException: com.alibaba.dubbo.common.Version
<dependency> <groupId>com.alibaba.boot</groupId> <artifactId>dubbo-spring-bo ...
- 报错:java.lang.ClassNotFoundException: io.opentracing.util.GlobalTracer
报错:java.lang.ClassNotFoundException: io.opentracing.util.GlobalTracer 近来在做一个在线教育的项目,课程信息放在数据库,而视频放在阿 ...
- Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils
1.错误叙述性说明 警告: Could not create JarEntryRevision for [jar:file:/D:/MyEclipse/apache-tomcat-7.0.53/web ...
- Caused by: java.lang.ClassNotFoundException: com.mchange.v2.c3p0.ComboPooledDataSource
1.错误描写叙述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -he ...
随机推荐
- dnspython
dnspython 一个Python实现的一个DNS工具包,利用其查询功能来实现dns的服务监控及解析结果的校验. 安装 pip install dnspython 解析域名为IP from dns ...
- 基本的Sql编写注意事项
基本的Sql编写注意事项 尽量少用IN操作符,基本上所有的IN操作符都可以用EXISTS代替. 不用NOT IN操作符,可以用NOT EXISTS或者外连接+替代. Oracle在执行IN子查询时,首 ...
- 02docker简单使用和配置(网络、存储和Hub)
四:网络 1:命名容器 在各种docker命令中,可以通过名字中找到对应的容器.之前创建的容器都是由docker自动命名的,可以在docker run中,通过--name参数指定容器的名字.比如: ...
- 阿里云POLARDB如何助力轻松筹打造5亿用户信赖的大病筹款平台?
轻松筹首创了“大病救助”模式,帮助了众多病患在第一时间解決了医疗资金等问题,为了从源头解决了医疗资金问题.而在轻松筹这样全球5.5亿用户信赖的大病筹款平台的背后,是日益增长的各种数据.面对这样数据量所 ...
- laravel框架手机发送验证码
https://blog.csdn.net/sunny_lg/article/details/52471225 现在登录注册时 我们的验证方法 不在单一化 手机发送验证码 已经成为常态 让我们 一起 ...
- day8_python网络编程(实验版本)
1.简单的套接字通信 1.1.服务端 import socket # 买手机 phone = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # 插 ...
- oracle函数 exp(y)
[功能]返回e的y次幂(e为数学常量) [参数]y,数字型表达式 [返回]数字 [示例] select exp(3),exp(0),exp(-3) from dual; 返回:20.0855369,1 ...
- behavior planning——12.example cost funtion -lane change penalty
In the image above, the blue self driving car (bottom left) is trying to get to the goal (gold sta ...
- Spring Boot 集成日志logback + 控制台打印SQL
一: 控制台打印SQL application.properties中添加如下即可在控制台打印sql logging.level.com.fx.fxxt.mapper=debug 二:日志 因为Spr ...
- JavaScript 全国级省市县联动
<div class="right_content clearfix"> <h3 class="common_title2">收货地址& ...