dubbo2调用dubbo1的列表查询接口时报错

来源:3-9 业务场景实战之商城商品列表功能~列表查询功能自测实战-2

laoca0

2019-04-12 17:08

以下是dubbo2的错:

java.lang.IllegalStateException: No such extension com.alibaba.dubbo.validation.Validation by name ture

at com.alibaba.dubbo.common.extension.ExtensionLoader.findException(ExtensionLoader.java:482)

at com.alibaba.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:489)

at com.alibaba.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:309)

at com.alibaba.dubbo.validation.Validation$Adaptive.getValidator(Validation$Adaptive.java)

at com.alibaba.dubbo.validation.filter.ValidationFilter.invoke(ValidationFilter.java:48)

at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)

at com.alibaba.dubbo.rpc.filter.ExceptionFilter.invoke(ExceptionFilter.java:62)

at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)

at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75)

at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)

at com.alibaba.dubbo.rpc.filter.TimeoutFilter.invoke(TimeoutFilter.java:42)

at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)

at com.alibaba.dubbo.rpc.protocol.dubbo.filter.TraceFilter.invoke(TraceFilter.java:78)

at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)

at com.alibaba.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:73)

at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)

at com.alibaba.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:138)

at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)

at com.alibaba.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:38)

at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)

at com.alibaba.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:38)

at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)

at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:104)

at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:96)

at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:173)

at com.alibaba.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51)

at com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)

------------------------------------------------------------------------------------------------------------------------------------

以下是dubbo1的错:

[2019-04-12 16:58:22.411] boot - ERROR [DubboServerHandler-192.168.199.103:20903-thread-2] --- ExceptionFilter:  [DUBBO] Got unchecked and undeclared exception which called by 192.168.199.103. service: com.dubbo.one.server.api.service.IDubboItemInfoService, method: listItems, exception: java.lang.IllegalStateException: No such extension com.alibaba.dubbo.validation.Validation by name ture, dubbo version: 2.6.5, current host: 192.168.199.103

java.lang.IllegalStateException: No such extension com.alibaba.dubbo.validation.Validation by name ture


--------------------------------------------------------------------------------------------------------------------------------------

望老师能帮忙给出解决思路

写回答 关注

2回答

  • 我真的看不懂
    2019-09-19 22:30:23

    可行,我也是这里出的错。你在哪里查到的原文,发来研究一下

  • laoca0
    2019-04-12 19:15:06

    自己找到原因了。

    把dubbo1的DubboItemService中@Service注解    validation = "ture"   去掉,dubbo1服务不再报错,成功返回数据给dubbo2。

    可能是dubbo版本原因???

    //@Service(protocol = {"dubbo","rest"},validation = "ture",version = "1.0",timeout = 6000)

    爱莲说

    你用的什么版本号?我用的2.5.5依然报错

    2019-04-16 13:53:41

    共 1 条回复 >

2小时实战Apache顶级项目-RPC框架Dubbo分布式服务调度

快速入门并实战分布式任务调度框架Dubbo

20338 学习 · 145 问题

查看课程

相似问题