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/07/13 10:32:36 UTC

[GitHub] [shardingsphere] strongduanmu opened a new issue, #19106: Add resource throw NPE when use database with upper database name

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

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   https://github.com/apache/shardingsphere/commit/4f15b70e828888c0d9880f1e32c623c272b73840
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy
   
   ### Expected behavior
   
   Add resources successfully when use database with upper database name.
   
   ### Actual behavior
   
   ```
   org.apache.zookeeper.ClientCnxn$SessionTimeoutException: Client session timed out, have not heard from server in 58213ms for session id 0x100000046bc0040
   	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1230)
   [ERROR] 2022-07-13 18:27:28.396 [ShardingSphere-Command-0] o.a.s.p.b.t.d.r.r.AddResourceBackendHandler - Add resource failed
   java.lang.NullPointerException: null
   	at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
   	at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
   	at org.apache.shardingsphere.infra.federation.optimizer.context.OptimizerContext.alterDatabase(OptimizerContext.java:73)
   	at org.apache.shardingsphere.mode.manager.ContextManager.updateResources(ContextManager.java:209)
   	at org.apache.shardingsphere.proxy.backend.text.distsql.rdl.resource.AddResourceBackendHandler.execute(AddResourceBackendHandler.java:63)
   	at org.apache.shardingsphere.proxy.backend.text.distsql.rdl.resource.AddResourceBackendHandler.execute(AddResourceBackendHandler.java:44)
   	at org.apache.shardingsphere.proxy.backend.text.DatabaseRequiredBackendHandler.execute(DatabaseRequiredBackendHandler.java:51)
   	at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:95)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:108)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:78)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
   	at java.base/java.lang.Thread.run(Thread.java:833)
   [ERROR] 2022-07-13 18:27:28.399 [ShardingSphere-Command-0] o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
   org.apache.shardingsphere.infra.distsql.exception.resource.InvalidResourcesException: Can not process invalid resources, error messages are: [null].
   	at org.apache.shardingsphere.proxy.backend.text.distsql.rdl.resource.AddResourceBackendHandler.execute(AddResourceBackendHandler.java:68)
   	at org.apache.shardingsphere.proxy.backend.text.distsql.rdl.resource.AddResourceBackendHandler.execute(AddResourceBackendHandler.java:44)
   	at org.apache.shardingsphere.proxy.backend.text.DatabaseRequiredBackendHandler.execute(DatabaseRequiredBackendHandler.java:51)
   	at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:95)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:108)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:78)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
   	at java.base/java.lang.Thread.run(Thread.java:833)
   [INFO ] 2022-07-13 18:27:28.489 [Quartz Shutdown-Hook _finished_check] o.a.s.e.l.i.s.JobShutdownHookPlugin - Shutting down Quartz... _finished_check
   [INFO ] 2022-07-13 18:27:28.489 [Quartz Shutdown-Hook _finished_check] org.quartz.core.QuartzScheduler - Scheduler _finished_check_$_NON_CLUSTERED shutting down.
   [INFO ] 2022-07-13 18:27:28.489 [Quartz Shutdown-Hook _finished_check] org.quartz.core.QuartzScheduler - Scheduler _finished_check_$_NON_CLUSTERED paused.
   [INFO ] 2022-07-13 18:27:28.501 [_finished_check_Worker-1-EventThread] o.a.c.f.state.ConnectionStateManager - State change: SUSPENDED
   [INFO ] 2022-07-13 18:27:28.501 [main-EventThread] o.a.c.f.state.ConnectionStateManager - State change: SUSPENDED
   [INFO ] 2022-07-13 18:27:28.502 [main-EventThread] o.a.c.f.state.ConnectionStateManager - State change: SUSPENDED
   ```
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   ### 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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

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


[GitHub] [shardingsphere] zjcnb closed issue #19106: Add resource throw NPE when use database with upper database name

Posted by GitBox <gi...@apache.org>.
zjcnb closed issue #19106: Add resource throw NPE when use database with upper database name
URL: https://github.com/apache/shardingsphere/issues/19106


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