You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/02/17 11:54:21 UTC

[GitHub] [shardingsphere] zjcnb opened a new issue #15477: Local dataSources and Remote dataSources are different has some error when JDBC start up.

zjcnb opened a new issue #15477:
URL: https://github.com/apache/shardingsphere/issues/15477


   ### Which version of ShardingSphere did you use?
   
   `master`
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   `ShardingSphere-JDBC`
   
   ### Expected behavior
   
   Get DataSource by Zookeeper
   
   ### Actual behavior
   
   ```
   Caused by: java.lang.IllegalArgumentException: Data source names cannot be empty.
   	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:142) ~[guava-30.0-jre.jar:na]
   	at org.apache.shardingsphere.sharding.rule.builder.ShardingRuleBuilder.build(ShardingRuleBuilder.java:40) ~[shardingsphere-sharding-core-5.1.1-SNAPSHOT.jar:5.1.1-SNAPSHOT]
   	at org.apache.shardingsphere.sharding.rule.builder.ShardingRuleBuilder.build(ShardingRuleBuilder.java:35) ~[shardingsphere-sharding-core-5.1.1-SNAPSHOT.jar:5.1.1-SNAPSHOT]
   	at org.apache.shardingsphere.infra.rule.builder.schema.SchemaRulesBuilder.buildRules(SchemaRulesBuilder.java:63) ~[shardingsphere-infra-common-5.1.1-SNAPSHOT.jar:5.1.1-SNAPSHOT]
   	at org.apache.shardingsphere.mode.metadata.MetaDataContextsBuilder.getSchemaRules(MetaDataContextsBuilder.java:85) ~[shardingsphere-mode-core-5.1.1-SNAPSHOT.jar:5.1.1-SNAPSHOT]
   	at org.apache.shardingsphere.mode.metadata.MetaDataContextsBuilder.addSchema(MetaDataContextsBuilder.java:77) ~[shardingsphere-mode-core-5.1.1-SNAPSHOT.jar:5.1.1-SNAPSHOT]
   	at org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder.createMetaDataContextsBuilder(ClusterContextManagerBuilder.java:84) ~[shardingsphere-cluster-mode-core-5.1.1-SNAPSHOT.jar:5.1.1-SNAPSHOT]
   	at org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder.build(ClusterContextManagerBuilder.java:66) ~[shardingsphere-cluster-mode-core-5.1.1-SNAPSHOT.jar:5.1.1-SNAPSHOT]
   	at org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource.createContextManager(ShardingSphereDataSource.java:81) ~[shardingsphere-jdbc-core-5.1.1-SNAPSHOT.jar:5.1.1-SNAPSHOT]
   	at org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource.<init>(ShardingSphereDataSource.java:64) ~[shardingsphere-jdbc-core-5.1.1-SNAPSHOT.jar:5.1.1-SNAPSHOT]
   	at org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory.createDataSource(ShardingSphereDataSourceFactory.java:77) ~[shardingsphere-jdbc-core-5.1.1-SNAPSHOT.jar:5.1.1-SNAPSHOT]
   	at org.apache.shardingsphere.spring.boot.ShardingSphereAutoConfiguration.shardingSphereDataSource(ShardingSphereAutoConfiguration.java:93) ~[shardingsphere-jdbc-core-spring-boot-starter-5.1.1-SNAPSHOT.jar:5.1.1-SNAPSHOT]
   	at org.apache.shardingsphere.spring.boot.ShardingSphereAutoConfiguration$$EnhancerBySpringCGLIB$$bc715719.CGLIB$shardingSphereDataSource$2(<generated>) ~[shardingsphere-jdbc-core-spring-boot-starter-5.1.1-SNAPSHOT.jar:5.1.1-SNAPSHOT]
   	at org.apache.shardingsphere.spring.boot.ShardingSphereAutoConfiguration$$EnhancerBySpringCGLIB$$bc715719$$FastClassBySpringCGLIB$$f5dcc32a.invoke(<generated>) ~[shardingsphere-jdbc-core-spring-boot-starter-5.1.1-SNAPSHOT.jar:5.1.1-SNAPSHOT]
   	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.2.0.RELEASE.jar:5.2.0.RELEASE]
   	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363) ~[spring-context-5.2.0.RELEASE.jar:5.2.0.RELEASE]
   	at org.apache.shardingsphere.spring.boot.ShardingSphereAutoConfiguration$$EnhancerBySpringCGLIB$$bc715719.shardingSphereDataSource(<generated>) ~[shardingsphere-jdbc-core-spring-boot-starter-5.1.1-SNAPSHOT.jar:5.1.1-SNAPSHOT]
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_211]
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_211]
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_211]
   	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_211]
   	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
   	... 20 common frames omitted
   ```
   
   ### Reason analyze (If you can)
   
   Maybe `getEffectiveDataSources(final String schemaName, final Map<String, ? extends SchemaConfiguration> schemaConfigs)` not has consider `Zookeeper` dataSources and local dataSources not same problem.
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] menghaoranss commented on issue #15477: Local dataSources and Remote dataSources are different has some error when JDBC start up.

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #15477:
URL: https://github.com/apache/shardingsphere/issues/15477#issuecomment-1043958588


   fixes by #15485 


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] menghaoranss closed issue #15477: Local dataSources and Remote dataSources are different has some error when JDBC start up.

Posted by GitBox <gi...@apache.org>.
menghaoranss closed issue #15477:
URL: https://github.com/apache/shardingsphere/issues/15477


   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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