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要一致
  • 相关阅读:
    洛谷 P3391 文艺平衡树
    [ZJOI2008]杀蚂蚁 Solution
    POJ P3667 Hotel——solution
    洛谷 P2469 [SDOI2010]星际竞速 解题报告
    POJ P2318 TOYS与POJ P1269 Intersecting Lines——计算几何入门题两道
    【linux】基础知识学习
    【linux】打包压缩命令
    【python】类file文件处理
    【python】使用asyncore进行异步通信
    【python】命令行解析工具getopt用法
  • 原文地址:https://www.cnblogs.com/jamespan23/p/7722674.html
Copyright © 2011-2022 走看看