YanlongMa opened a new issue #9121:
URL: https://github.com/apache/shardingsphere/issues/9121


   ## Question
   
   config and error info , is jetcd version reason ?
   
   pom.xml
   ```
   <dependency>
       <groupId>org.apache.shardingsphere</groupId>
       
<artifactId>shardingsphere-jdbc-governance-spring-boot-starter</artifactId>
       <version>5.0.0-alpha</version>
       <exclusions>
           <exclusion>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-test</artifactId>
           </exclusion>
       </exclusions>
   </dependency>
   
   <dependency>
       <groupId>org.apache.shardingsphere</groupId>
       <artifactId>shardingsphere-governance-repository-etcd</artifactId>
       <version>5.0.0-alpha</version>
   </dependency>
   ```
   
   application.properties
   ```
   spring.shardingsphere.datasource.names=primary,replica0,replica1
   
   
spring.shardingsphere.datasource.common.type=com.zaxxer.hikari.HikariDataSource
   
spring.shardingsphere.datasource.common.driver-class-name=com.mysql.cj.jdbc.Driver
   
   # primary
   
spring.shardingsphere.datasource.primary.jdbc-url=jdbc:mysql://127.0.0.1:3306/primary?useUnicode=true&characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai
   spring.shardingsphere.datasource.primary.username=root
   spring.shardingsphere.datasource.primary.password=123456
   
   # replica0
   
spring.shardingsphere.datasource.replica0.jdbc-url=jdbc:mysql://127.0.0.1:3306/replica0?useUnicode=true&characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai
   spring.shardingsphere.datasource.replica0.username=root
   spring.shardingsphere.datasource.replica0.password=123456
   
   # replica1
   
spring.shardingsphere.datasource.replica1.jdbc-url=jdbc:mysql://127.0.0.1:3306/replica1?useUnicode=true&characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai
   spring.shardingsphere.datasource.replica1.username=root
   spring.shardingsphere.datasource.replica1.password=123456
   
   
spring.shardingsphere.rules.replica-query.load-balancers.taishan-basic.type=ROUND_ROBIN
   
spring.shardingsphere.rules.replica-query.load-balancers.taishan-basic.props.test=test
   
spring.shardingsphere.rules.replica-query.data-sources.taishan-basic.primary-data-source-name=primary
   
spring.shardingsphere.rules.replica-query.data-sources.taishan-basic.replica-data-source-names=replica0,replica1
   
spring.shardingsphere.rules.replica-query.data-sources.taishan-basic.load-balancer-name=taishan-basic
   
   spring.shardingsphere.props.sql-show=true
   
   spring.shardingsphere.governance.name=taishan-basic
   spring.shardingsphere.governance.registry-center.type=etcd
   spring.shardingsphere.governance.registry-center.server-lists=localhost:2379
   spring.shardingsphere.governance.registry-center.props.xxx=meiyou
   spring.shardingsphere.governance.additional-config-center.type=etcd
   
spring.shardingsphere.governance.additional-config-center.server-lists=localhost:2379
   spring.shardingsphere.governance.additional-config-center.props.xxx=meiyou
   spring.shardingsphere.governance.overwrite=true
   ```
   
   run , then error info :
   ```
   Error starting ApplicationContext. To display the conditions report re-run 
your application with 'debug' enabled.
   2021-01-21 19:43:59.388 ERROR 67232 --- [  restartedMain] 
o.s.b.d.LoggingFailureAnalysisReporter   : 
   
   ***************************
   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:
   
       
io.etcd.jetcd.ClientConnectionManager.defaultChannelBuilder(ClientConnectionManager.java:190)
   
   The following method did not exist:
   
       
io.grpc.netty.NettyChannelBuilder.nameResolverFactory(Lio/grpc/NameResolver$Factory;)Lio/grpc/internal/AbstractManagedChannelImplBuilder;
   
   The method's class, io.grpc.netty.NettyChannelBuilder, is available from the 
following locations:
   
       
jar:file:/Users/marko/.m2/repository/io/grpc/grpc-netty/1.33.0/grpc-netty-1.33.0.jar!/io/grpc/netty/NettyChannelBuilder.class
   
   The class hierarchy was loaded from the following locations:
   
       io.grpc.netty.NettyChannelBuilder: 
file:/Users/marko/.m2/repository/io/grpc/grpc-netty/1.33.0/grpc-netty-1.33.0.jar
       io.grpc.ForwardingChannelBuilder: 
file:/Users/marko/.m2/repository/io/grpc/grpc-api/1.33.0/grpc-api-1.33.0.jar
       io.grpc.ManagedChannelBuilder: 
file:/Users/marko/.m2/repository/io/grpc/grpc-api/1.33.0/grpc-api-1.33.0.jar
   
   
   Action:
   
   Correct the classpath of your application so that it contains a single, 
compatible version of io.grpc.netty.NettyChannelBuilder
   
   
   Process finished with exit code 0
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to