dubbo消费者启动报错com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method xxx

消费者报错信息:

Invocation of init method failed; nested exception is com.alibaba.dubbo.rpc.RpcException: 
Failed to invoke the method 方法名 in the service service类名. 
Tried 1 times of the providers [测试服务器ip地址:20880] (1/1) from the registry 测试服务器ip地址:2181 on the consumer 
172.19.145.65 using the dubbo version 2.8.3. Last error is: Invoke remote method timeout. 
method: 方法名, provider: dubbo://测试服务器ip地址:20880/service类名

request: Request [id=0, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=方法名, parameterTypes=[class java.lang.String], arguments=[005], attachments={path=service类名, appId=项目名, interface=service类名, version=0.0.0, timeout=50000}]], channel: /测试服务器ip地址:48006 -> /测试服务器ip地址:20880

消费者报错信息:

[10:37:00|WARN |(com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation)]=[ [DUBBO] Decode argument[1] failed: java.lang.String cannot be cast to java.util.SortedMap, dubbo version: 2.8.3, current host: 127.0.0.1]
java.lang.ClassCastException: java.lang.String cannot be cast to java.util.SortedMap
    at de.javakaffee.kryoserializers.SynchronizedCollectionsSerializer$SynchronizedCollection$7.create(SynchronizedCollectionsSerializer.java:148)
    at de.javakaffee.kryoserializers.SynchronizedCollectionsSerializer.read(SynchronizedCollectionsSerializer.java:71)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:761)
    at com.alibaba.dubbo.common.serialize.support.kryo.KryoObjectInput.readObject(KryoObjectInput.java:125)
    at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:117)
    at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:74)
    at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.decodeBody(DubboCodec.java:140)
    at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:134)
    at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:95)
    at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCountCodec.decode(DubboCountCodec.java:46)
    at com.alibaba.dubbo.remoting.transport.netty.NettyCodecAdapter$InternalDecoder.messageReceived(NettyCodecAdapter.java:134)
    at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
    at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
    at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
    at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
    at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
    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)

进行jar包冲突排查解决后,问题消失,应该是jar包冲突了。

idea冲突解决办法:maven窗口中有show dependencies选项,点击后会打开项目的jar包依赖关系图,右键Actual size显示正常大小,有冲突的jar包会被红色虚线标注出来,点击需要排除的jar,右键Exclude或者shift+delete排除jar包

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值