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 provider
泛化调用报错:
先贴错误
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客户端-->
更多推荐
所有评论(0)