sandynz opened a new issue #16351:
URL: https://github.com/apache/shardingsphere/issues/16351
## Bug Report
### Which version of ShardingSphere did you use?
master branch, commit 63ab54bd886623a2583c86dda8beb3128079dbfe
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
Proxy start without exception.
### Actual behavior
Exception stack trace:
```
Exception in thread "main" java.lang.NullPointerException
at
org.apache.shardingsphere.infra.federation.optimizer.metadata.FederationMetaData.<init>(FederationMetaData.java:38)
at
org.apache.shardingsphere.infra.federation.optimizer.context.OptimizerContextFactory.create(OptimizerContextFactory.java:47)
at
org.apache.shardingsphere.mode.metadata.MetaDataContextsBuilder.build(MetaDataContextsBuilder.java:116)
at
org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder.build(ClusterContextManagerBuilder.java:79)
at
org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.createContextManager(BootstrapInitializer.java:72)
at
org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.init(BootstrapInitializer.java:57)
at org.apache.shardingsphere.proxy.Bootstrap.main(Bootstrap.java:47)
```
### Reason analyze (If you can)
<img width="1173" alt="图片"
src="https://user-images.githubusercontent.com/42492540/160041532-bd61fb85-16c4-4ae2-b258-7d5a17c5b6d7.png">
`entry.getValue().getSchema()` return null.
From `ShardingSphereMetaData.java`
```
public ShardingSphereSchema getSchema() {
return schemas.get(name);
}
```
From screenshot, `schemas`'s key is `datasources`, but `name` is
`dataSources`, it doesn't match.
Why `dataSources` exists in registry center? It's the old node, it's still
kept after `versions` added.
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
Run `Bootstrap` in IDE.
### Example codes for reproduce this issue (such as a github link).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]