Failed to invoke the method $invoke in the service com.***GenericService. Tried 3 times of the provi

泛化调用报错:
先贴错误
Exception in thread “main” com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method $invoke in the service com.alibaba.dubbo.rpc.service.GenericService. Tried 3 times of the providers [10.2.7.5:20880] (1/1) from the registry 10.2.0.201:2181 on the consumer 172.28.21.91 using the dubbo version 2.6.6. Last error is: Failed to invoke remote method: KaTeX parse error: Expected 'EOF', got '&' at position 73: …ce?anyhost=true&̲application=dub…invoke, parameterTypes=null, arguments=null, attachments={path=com.***.***Service, input=341, dubbo=2.0.2, version=0.0.0}]

在这里插入图片描述
我的目的是想实现dubbo接口的泛化调用,一直被这个问题卡了很久
在网上查了很久,大致分为以下几类
1:调用的参数不正确,如参数类型
2:provider的参数类型没有实现序列化

然而按照以上思路逐一排查,发现问题依然存在,然后求助开发小哥哥,他居然跑通了!一模一样的代码!

引用包点击进去查看dubbo的版本号,发现问题了,他的版本号是,版本高一些

		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>dubbo</artifactId>
			<version>2.8.4</version>
		</dependency>

而我的是:

		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>dubbo</artifactId>
			<version>2.8.4</version>
		</dependency>

估计旧版本不支持泛化调用,泛化调用时后来才加上的功能,赶紧升级本地dubbo版本,再测试,又报错,引用新包,得到解决

后来报错内容如下,表示类找不到,引用zkClient包得到解决

java.lang.NoClassDefFoundError: org/I0Itec/zkclient/IZkStateListener
		<dependency>
		    <groupId>com.101tec</groupId>
		    <artifactId>zkclient</artifactId>
		    <version>0.10</version>
		</dependency>
		<!--注册中心zk客户端-->
  • 5
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值