1. org.apache.dubbo.rpc.RpcException: Failed to invoke the method findById in the service com.zzx.shoppingmall_common.service.BrandService. Tried 3 times of the providers [192.168.126.1:20880] (1/1) from the registry 192.168.126.31:2181 on the consumer 192.168.126.1 using the dubbo version 2.7.8. Last error is: Failed to invoke remote method: findById, provider: dubbo://192.168.126.1:20880/com.zzx.shoppingmall_common.service.BrandService?anyhost=true&application=shoppingmall_manager_api&check=false&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&init=false&interface=com.zzx.shoppingmall_common.service.BrandService&metadata-type=remote&methods=findById&pid=20004&qos.enable=false®ister.ip=192.168.126.1&release=2.7.8&remote.application=shoppingmall_goods_service&side=consumer&sticky=false×tamp=1692150209836, cause: org.apache.dubbo.remoting.RemotingException: com.alibaba.com.caucho.hessian.io.HessianProtocolException: ‘com.zzx.shoppingmall_common.exception.BusException’ could not be instantiated
解决方案:是因为通用模块的自定义异常需要增加一个无参构造方法,否则consumer将报HessianProtocolException: ‘xxxxException’ could not be instantiated异常并无法获取provider端的异常信息。