Closed xiaoming728 closed 1 year ago
强制指定spirngcloud版本为4.0.1报错, 强制指定sofa版本为5.1.0也报错
APPLICATION FAILED TO START
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.alipay.sofa.rpc.registry.zk.ZookeeperRegistry.subscribeConfig(ZookeeperRegistry.java:422)
The following method did not exist:
org.apache.curator.framework.recipes.cache.PathChildrenCache.getListenable()Lorg/apache/curator/framework/listen/ListenerContainer;
The calling method's class, com.alipay.sofa.rpc.registry.zk.ZookeeperRegistry, was loaded from the following location:
jar:file:/Users/liuchunming/.m2/repository/com/alipay/sofa/sofa-rpc-all/5.8.3/sofa-rpc-all-5.8.3.jar!/com/alipay/sofa/rpc/registry/zk/ZookeeperRegistry.class
The called method's class, org.apache.curator.framework.recipes.cache.PathChildrenCache, is available from the following locations:
jar:file:/Users/liuchunming/.m2/repository/org/apache/curator/curator-recipes/5.1.0/curator-recipes-5.1.0.jar!/org/apache/curator/framework/recipes/cache/PathChildrenCache.class
The called method's class hierarchy was loaded from the following locations:
org.apache.curator.framework.recipes.cache.PathChildrenCache: file:/Users/liuchunming/.m2/repository/org/apache/curator/curator-recipes/5.1.0/curator-recipes-5.1.0.jar
Action:
Correct the classpath of your application so that it contains compatible versions of the classes com.alipay.sofa.rpc.registry.zk.ZookeeperRegistry and org.apache.curator.framework.recipes.cache.PathChildrenCache
SOFARPC 在使用 ZK 注册中心时对应的 ZK 版本是 4.0.1 ,无法与 SpringCloudGateway 使用的 ZK 版本兼容,目前只能其中一种使用 ZK,另外一种使用非 ZK 的类型
使用sofaboot-dependencies 3.19.1 springboot版本是2.7.10 spingcloud版本是2021.0.8 这样配置时使用gateway网关,zookeeper的curator版本冲突, sofa是4.0.1,springcloud是5.1.0应该怎么解决