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&register=true&register.ip=10.198.0.10&release=2.7.3&remote.application=boazy-dubbo-demo-provider&server=jetty&side=consumer&sticky=false&timestamp=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&register=true&release=2.7.3&server=jetty&side=provider&timestamp=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&register=true&release=2.7.3&server=jetty&side=provider&timestamp=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&register=true&register.ip=10.198.0.10&release=2.7.3&remote.application=boazy-dubbo-demo-provider&server=jetty&side=consumer&sticky=false&timestamp=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&register=true&register.ip=10.198.0.10&release=2.7.3&remote.application=boazy-dubbo-demo-provider&server=jetty&side=consumer&sticky=false&timestamp=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 错误问题的更多相关文章

  1. Caused by: java.lang.ClassNotFoundException: org.jboss.logging.BasicLogger

    1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help ...

  2. SpringCloud使用Feign出现java.lang.ClassNotFoundException: org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory异常

    废话不多说!!! 在SpringCloud项目中配置了Feign来调用restful接口,项目启动的时候报错,报错信息如下: 找不到org.springframework.cloud.client.l ...

  3. 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. ...

  4. Hibenate错误汇总:java.lang.NoClassDefFoundError: org/jboss/logging/BasicLogger

    转自:https://bioubiou.iteye.com/blog/1769950 1 Hibenate异常汇总:java.lang.NoClassDefFoundError: org/jboss/ ...

  5. dubbo启动报java.lang.ClassNotFoundException: javassist.ClassPath

    原文: dubbo启动报java.lang.ClassNotFoundException: javassist.ClassPath         在dubbo启动的过程中报错误:java.lang. ...

  6. Caused by: java.lang.ClassNotFoundException: com.alibaba.dubbo.common.Version

    <dependency> <groupId>com.alibaba.boot</groupId> <artifactId>dubbo-spring-bo ...

  7. 报错:java.lang.ClassNotFoundException: io.opentracing.util.GlobalTracer

    报错:java.lang.ClassNotFoundException: io.opentracing.util.GlobalTracer 近来在做一个在线教育的项目,课程信息放在数据库,而视频放在阿 ...

  8. 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 ...

  9. Caused by: java.lang.ClassNotFoundException: com.mchange.v2.c3p0.ComboPooledDataSource

    1.错误描写叙述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -he ...

随机推荐

  1. Libevent:8Bufferevents高级主题

    本章描述的是Libevent的bufferevent实现的一些高级特性,这对于普通应用来说并非必须的.如果你只是学习如何使用bufferevent,则应该跳过本章去阅读evbuffer的章节. 一:成 ...

  2. 【NS2】NS2修改MAC协议(转载)

    NS2版本:2.34   涉及NS2代码文件: ns-2.34/mac/channel.h ns-2.34/mac/channel.cc ns-2.34/mac/wireless-phyExt.h n ...

  3. Java面向对象----方法重载

    方法重载(over load):方法名相同,参数列表不同,返回类型无关 package com.tanlei.newer; public class OverLoadDemo { public sta ...

  4. 字符串分割+二维数组 Day15练习

    package com.sxt.arrays.test; import java.util.Arrays; /* 1,2,3,4!5,6,7!8,9!12,456,90!32 * 将此字符串以叹号为分 ...

  5. Codesign error: Certificate identity appearing twice

    第一种解决方法: I think I figured out why the simple delete is not working. Because the dev certificate is ...

  6. @loj - 3039@ 「JOISC 2019 Day4」蛋糕拼接 3

    目录 @description@ @solution@ @accepted code@ @details@ @description@ 今天是 IOI 酱的生日,所以她的哥哥 JOI 君给她预定了一个 ...

  7. div 禁止点击

    今天需要这个需求,原来真的有 style="pointer-events: none;"

  8. uva 11275 3D Triangles (3D-Geometry)

    uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem= ...

  9. git 删除时报 the branch is not fully merged 这是什么意思

    今天删除本地分支 git branch -d XX 提示: the branch XXX is not fully merged原因:XXX分支有没有合并到当前分支的内容 解决方法:使用大写的D 强制 ...

  10. 2019-9-2-本文说如何显示SVG

    title author date CreateTime categories 本文说如何显示SVG lindexi 2019-09-02 12:57:38 +0800 2018-2-13 17:23 ...