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/05/27 04:11:00 UTC

[GitHub] [shardingsphere] zjcnb opened a new issue, #17994: NPE occurred when use db-discovery `MySQL.NORMAL_REPLICATION`

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

   ### Which version of ShardingSphere did you use?
   
   `master`
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   `ShardingSphere-Proxy`
   
   ```
   Exception in thread "main" java.lang.NullPointerException
   	at org.apache.shardingsphere.dbdiscovery.rule.DatabaseDiscoveryDataSourceRule.lambda$getReplicaDataSourceNames$0(DatabaseDiscoveryDataSourceRule.java:73)
   	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
   	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
   	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
   	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
   	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
   	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
   	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
   	at org.apache.shardingsphere.dbdiscovery.rule.DatabaseDiscoveryDataSourceRule.getReplicaDataSourceNames(DatabaseDiscoveryDataSourceRule.java:73)
   	at org.apache.shardingsphere.dbdiscovery.aware.DatabaseDiscoveryDynamicDataSourceStrategy.getReplicaDataSourceNames(DatabaseDiscoveryDynamicDataSourceStrategy.java:45)
   	at org.apache.shardingsphere.readwritesplitting.strategy.type.DynamicReadwriteSplittingStrategy.getAllDataSources(DynamicReadwriteSplittingStrategy.java:55)
   	at org.apache.shardingsphere.readwritesplitting.rule.ReadwriteSplittingRule.getDataSourceMapper(ReadwriteSplittingRule.java:104)
   	at org.apache.shardingsphere.singletable.rule.SingleTableRule.getAggregateDataSourceMap(SingleTableRule.java:87)
   	at org.apache.shardingsphere.singletable.rule.SingleTableRule.getAggregateDataSourceMap(SingleTableRule.java:79)
   	at org.apache.shardingsphere.singletable.rule.SingleTableRule.<init>(SingleTableRule.java:68)
   	at org.apache.shardingsphere.singletable.rule.builder.SingleTableRuleBuilder.build(SingleTableRuleBuilder.java:40)
   	at org.apache.shardingsphere.singletable.rule.builder.SingleTableRuleBuilder.build(SingleTableRuleBuilder.java:35)
   	at org.apache.shardingsphere.infra.rule.builder.schema.DatabaseRulesBuilder.build(DatabaseRulesBuilder.java:56)
   	at org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase.create(ShardingSphereDatabase.java:73)
   	at org.apache.shardingsphere.mode.metadata.MetaDataContextsBuilder.getGenericDatabaseMap(MetaDataContextsBuilder.java:79)
   	at org.apache.shardingsphere.mode.metadata.MetaDataContextsBuilder.getDatabaseMap(MetaDataContextsBuilder.java:69)
   	at org.apache.shardingsphere.mode.metadata.MetaDataContextsBuilder.build(MetaDataContextsBuilder.java:61)
   	at org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder.build(ClusterContextManagerBuilder.java:72)
   	at org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.createContextManager(BootstrapInitializer.java:70)
   	at org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.init(BootstrapInitializer.java:55)
   	at org.apache.shardingsphere.proxy.Bootstrap.main(Bootstrap.java:50)
   Disconnected from the target VM, address: '127.0.0.1:53620', transport: 'socket'
   ```
   
   
   <img width="1299" alt="image" src="https://user-images.githubusercontent.com/33742097/170627456-d3e19daf-7a0d-43d7-8f83-01576d60c6d6.png">
   
   


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

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


[GitHub] [shardingsphere] terrymanu closed issue #17994: NPE occurred when use db-discovery `MySQL.NORMAL_REPLICATION`

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #17994: NPE occurred when use db-discovery `MySQL.NORMAL_REPLICATION`
URL: https://github.com/apache/shardingsphere/issues/17994


-- 
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] complone commented on issue #17994: NPE occurred when use db-discovery `MySQL.NORMAL_REPLICATION`

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

   Can you provide relevant information about ```config-database-discovery.yaml```? There may be a problem with ```primaryDataSource``` parsing


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