zoukankan      html  css  js  c++  java
  • com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote method解决方法

    报错日记:

    Caused by: com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote method: getUserAuthLevel, provider: dubbo://10.80.1.117:21553/com..ifp.oum.uia.api.IOumUserInfo?anyhost=true&application=bp&check=false&default.timeout=500000&dubbo=2.4.5&interface=com..ifp.oum.uia.api.IOumUserInfo&logger=slf4j&methods=checkPhoneIsExist,getUserInfo,getUserAuthLevel,getUserRegisterChannel&owner=&pid=729&revision=2.0.0&side=consumer&timestamp=1508745323817, cause: java.lang.UnsupportedOperationException: com.alibaba.com.caucho.hessian.io.BasicDeserializer@158acad4 java.lang.UnsupportedOperationException: com.alibaba.com.caucho.hessian.io.BasicDeserializer@158acad4 at com.alibaba.com.caucho.hessian.io.AbstractDeserializer.readObject(AbstractDeserializer.java:103) at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObjectInstance(Hessian2Input.java:2067) at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1592) at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1576) at com.alibaba.dubbo.common.serialize.support.hessian.Hessian2ObjectInput.readObject(Hessian2ObjectInput.java:94) at com.alibaba.dubbo.common.serialize.support.hessian.Hessian2ObjectInput.readObject(Hessian2ObjectInput.java:99) at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode(DecodeableRpcResult.java:83) at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode(DecodeableRpcResult.java:109) at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.decodeBody(DubboCodec.java:97) at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:128)

    原因是引入注解的时候变量名称和dobbo的consumer配置中的ID名称不一致。

    解决办法:

    consumer.xml中的配置内容:

    <dubbo:reference id="userService" interface="com.api.service.IUserService"/>

    类文件中注解引入的代码为:

    @Resource
    private IUserService userService;//userService和配置中的ID要一致
  • 相关阅读:
    24. Swap Nodes in Pairs
    23. Merge k Sorted Lists
    shell脚本报错:"[: =: unary operator expected"
    一种用 数组元素 指定 所调函数 的方法
    阻塞 非阻塞
    Linux open() 一个函数,两个函数原型
    QT 执行windows cmd 命令并读取结果
    Qt5 escape spaces in path
    获取磁盘的 总容量,空余容量,已用容量 【windows】
    通过进程名称,获取其路径
  • 原文地址:https://www.cnblogs.com/jamespan23/p/7722674.html
Copyright © 2011-2022 走看看