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 2021/03/29 08:58:23 UTC
[GitHub] [shardingsphere] sandynz opened a new issue #9865: SHOW SHARDING RULE throw NullPointerException when databaseStrategy is not configured
sandynz opened a new issue #9865:
URL: https://github.com/apache/shardingsphere/issues/9865
## Bug Report
### Which version of ShardingSphere did you use?
5.0.0-RC1-SNAPSHOT
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
No NPE thrown and show query result
### Actual behavior
Exception:
```
[ShardingSphere-Command-1] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
java.lang.NullPointerException: null
at org.apache.shardingsphere.proxy.backend.text.distsql.rql.impl.ShardingRuleQueryBackendHandler.generateShardingStrategy(ShardingRuleQueryBackendHandler.java:130)
at org.apache.shardingsphere.proxy.backend.text.distsql.rql.impl.ShardingRuleQueryBackendHandler.loadRuleConfiguration(ShardingRuleQueryBackendHandler.java:96)
at org.apache.shardingsphere.proxy.backend.text.distsql.rql.impl.ShardingRuleQueryBackendHandler.execute(ShardingRuleQueryBackendHandler.java:69)
at org.apache.shardingsphere.proxy.backend.text.distsql.rql.impl.ShardingRuleQueryBackendHandler.execute(ShardingRuleQueryBackendHandler.java:51)
at org.apache.shardingsphere.proxy.backend.text.SchemaRequiredBackendHandler.execute(SchemaRequiredBackendHandler.java:48)
at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:57)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:93)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:71)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
```
### Reason analyze (If you can)
Default strategy is not used
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Configure `defaultDatabaseStrategy` but no `databaseStategy` in `config-sharding.yaml`, similar for `tableStategy` and `keyGenerateStrategy`.
### 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu closed issue #9865: SHOW SHARDING RULE throw NullPointerException when databaseStrategy is not configured
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #9865:
URL: https://github.com/apache/shardingsphere/issues/9865
--
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:
users@infra.apache.org