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 2019/06/20 08:08:29 UTC

[GitHub] [incubator-shardingsphere] mwylaoma opened a new issue #2592: Sharding-Proxing change database error

mwylaoma opened a new issue #2592: Sharding-Proxing change database error
URL: https://github.com/apache/incubator-shardingsphere/issues/2592
 
 
   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub issues](https://github.com/apache/incubator-shardingsphere-example/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response **more than 7 days** and we cannot reproduce it on current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   4.0.0-RC2
   ### Which project did you use? Sharding-JDBC or Sharding-Proxy?
   Sharding-Proxy
   ### Expected behavior
   No Exception
   ### Actual behavior
   use cloud; #cloud is a database name
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   Here is my configuration:
   ```
   shardingRule:
     defaultDataSourceName: cloud_0
     defaultDatabaseStrategy:
       inline:
         shardingColumn: id
         algorithmExpression: cloud_${id % 2}
     defaultTableStrategy:
       none:
     defaultKeyGenerator:
       type: SNOWFLAKE
       column: id
   ```
   And here is the log:
   ```
   [INFO ] 16:07:04.032 [ShardingSphere-Command-2] ShardingSphere-SQL - Rule Type: sharding
   [INFO ] 16:07:04.032 [ShardingSphere-Command-2] ShardingSphere-SQL - Logic SQL: SET PROFILING = 1
   [INFO ] 16:07:04.032 [ShardingSphere-Command-2] ShardingSphere-SQL - SQLStatement: DALStatement(super=AbstractSQLStatement(type=DAL, sqlSegments=[], tables=Tables(tables=[]), shardingConditions=Conditions(orConditions=[]), encryptConditions=Conditions(orConditions=[]), parametersIndex=0, logicSQL=SET PROFILING = 1))
   [INFO ] 16:07:04.032 [ShardingSphere-Command-2] ShardingSphere-SQL - Actual SQL: cloud_0 ::: SET PROFILING = 1
   [INFO ] 16:07:04.034 [ShardingSphere-Command-1] ShardingSphere-SQL - Rule Type: sharding
   [INFO ] 16:07:04.034 [ShardingSphere-Command-1] ShardingSphere-SQL - Logic SQL: SHOW STATUS
   [INFO ] 16:07:04.034 [ShardingSphere-Command-1] ShardingSphere-SQL - SQLStatement: DALStatement(super=AbstractSQLStatement(type=DAL, sqlSegments=[], tables=Tables(tables=[]), shardingConditions=Conditions(orConditions=[]), encryptConditions=Conditions(orConditions=[]), parametersIndex=0, logicSQL=SHOW STATUS))
   [INFO ] 16:07:04.034 [ShardingSphere-Command-1] ShardingSphere-SQL - Actual SQL: cloud_0 ::: SHOW STATUS
   [INFO ] 16:07:04.052 [ShardingSphere-Command-4] ShardingSphere-SQL - Rule Type: sharding
   [INFO ] 16:07:04.052 [ShardingSphere-Command-4] ShardingSphere-SQL - Logic SQL: SHOW STATUS
   [INFO ] 16:07:04.052 [ShardingSphere-Command-4] ShardingSphere-SQL - SQLStatement: DALStatement(super=AbstractSQLStatement(type=DAL, sqlSegments=[], tables=Tables(tables=[]), shardingConditions=Conditions(orConditions=[]), encryptConditions=Conditions(orConditions=[]), parametersIndex=0, logicSQL=SHOW STATUS))
   [INFO ] 16:07:04.052 [ShardingSphere-Command-4] ShardingSphere-SQL - Actual SQL: cloud_0 ::: SHOW STATUS
   [ERROR] 16:07:04.061 [ShardingSphere-Command-0] o.a.s.s.f.c.CommandExecutorTask - Exception occur: 
   java.lang.NullPointerException: null
   ```
   
   ### 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


With regards,
Apache Git Services