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/06/21 04:32:16 UTC

[GitHub] [shardingsphere] strongduanmu opened a new issue, #18481: NullPointerException occurs when startup ShardingSphere proxy

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

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   https://github.com/apache/shardingsphere/commit/1bdc967ec427744749ac085a51c7083f19fce55e
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy
   
   ### Expected behavior
   
   startup ShardingSphere proxy successfully.
   
   ### Actual behavior
   
   ```
   Thanks for using Atomikos! This installation is not registered yet. 
   REGISTER FOR FREE at http://www.atomikos.com/Main/RegisterYourDownload and receive:
   - tips & advice 
   - working demos 
   - access to the full documentation 
   - special exclusive bonus offers not available to others 
   - everything you need to get the most out of using Atomikos!
   [ERROR] 2022-06-21 12:30:15.986 [Curator-SafeNotifyService-0] c.g.common.eventbus.EventBus.default - Exception thrown by subscriber method renew(org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.config.event.rule.RuleConfigurationsChangedEvent) on subscriber org.apache.shardingsphere.mode.manager.cluster.coordinator.ClusterContextManagerCoordinator@fd5689d when dispatching event: org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.config.event.rule.RuleConfigurationsChangedEvent@36f2c090
   java.lang.NullPointerException: null
   	at org.apache.shardingsphere.mode.manager.ContextManager.buildChangedMetaDataContext(ContextManager.java:582)
   	at org.apache.shardingsphere.mode.manager.ContextManager.alterRuleConfiguration(ContextManager.java:307)
   	at org.apache.shardingsphere.mode.manager.cluster.coordinator.ClusterContextManagerCoordinator.renew(ClusterContextManagerCoordinator.java:157)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:87)
   	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:144)
   	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:72)
   	at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30)
   	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:67)
   	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:108)
   	at com.google.common.eventbus.EventBus.post(EventBus.java:212)
   	at java.util.Optional.ifPresent(Optional.java:159)
   	at org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.GovernanceWatcherFactory.lambda$watch$0(GovernanceWatcherFactory.java:55)
   	at org.apache.shardingsphere.mode.repository.cluster.zookeeper.CuratorZookeeperRepository.lambda$watch$0(CuratorZookeeperRepository.java:240)
   	at org.apache.curator.framework.recipes.cache.TreeCacheListenerWrapper.sendEvent(TreeCacheListenerWrapper.java:71)
   	at org.apache.curator.framework.recipes.cache.TreeCacheListenerWrapper.event(TreeCacheListenerWrapper.java:42)
   	at org.apache.curator.framework.recipes.cache.CuratorCacheListenerBuilderImpl$2.lambda$event$0(CuratorCacheListenerBuilderImpl.java:149)
   	at java.util.ArrayList.forEach(ArrayList.java:1259)
   	at org.apache.curator.framework.recipes.cache.CuratorCacheListenerBuilderImpl$2.event(CuratorCacheListenerBuilderImpl.java:149)
   	at org.apache.curator.framework.recipes.cache.CuratorCacheImpl.lambda$putStorage$7(CuratorCacheImpl.java:279)
   	at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92)
   	at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89)
   	at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89)
   	at org.apache.curator.framework.recipes.cache.CuratorCacheImpl.lambda$callListeners$10(CuratorCacheImpl.java:293)
   	at java.util.concurrent.CompletableFuture$AsyncRun.run$$$capture(CompletableFuture.java:1640)
   	at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:748)
   [ERROR] 2022-06-21 12:30:15.990 [Curator-SafeNotifyService-0] c.g.common.eventbus.EventBus.default - Exception thrown by subscriber method renew(org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.config.event.datasource.DataSourceChangedEvent) on subscriber org.apache.shardingsphere.mode.manager.cluster.coordinator.ClusterContextManagerCoordinator@fd5689d when dispatching event: org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.config.event.datasource.DataSourceChangedEvent@1e8c5086
   java.lang.NullPointerException: null
   	at org.apache.shardingsphere.mode.manager.ContextManager.getDeletedDataSources(ContextManager.java:502)
   	at org.apache.shardingsphere.mode.manager.ContextManager.buildChangedMetaDataContextWithChangedDataSource(ContextManager.java:591)
   	at org.apache.shardingsphere.mode.manager.ContextManager.alterDataSourceConfiguration(ContextManager.java:326)
   	at org.apache.shardingsphere.mode.manager.cluster.coordinator.ClusterContextManagerCoordinator.renew(ClusterContextManagerCoordinator.java:170)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:87)
   	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:144)
   	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:72)
   	at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30)
   	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:67)
   	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:108)
   	at com.google.common.eventbus.EventBus.post(EventBus.java:212)
   	at java.util.Optional.ifPresent(Optional.java:159)
   	at org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.GovernanceWatcherFactory.lambda$watch$0(GovernanceWatcherFactory.java:55)
   	at org.apache.shardingsphere.mode.repository.cluster.zookeeper.CuratorZookeeperRepository.lambda$watch$0(CuratorZookeeperRepository.java:240)
   	at org.apache.curator.framework.recipes.cache.TreeCacheListenerWrapper.sendEvent(TreeCacheListenerWrapper.java:71)
   	at org.apache.curator.framework.recipes.cache.TreeCacheListenerWrapper.event(TreeCacheListenerWrapper.java:42)
   	at org.apache.curator.framework.recipes.cache.CuratorCacheListenerBuilderImpl$2.lambda$event$0(CuratorCacheListenerBuilderImpl.java:149)
   	at java.util.ArrayList.forEach(ArrayList.java:1259)
   	at org.apache.curator.framework.recipes.cache.CuratorCacheListenerBuilderImpl$2.event(CuratorCacheListenerBuilderImpl.java:149)
   	at org.apache.curator.framework.recipes.cache.CuratorCacheImpl.lambda$putStorage$7(CuratorCacheImpl.java:279)
   	at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92)
   	at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89)
   	at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89)
   	at org.apache.curator.framework.recipes.cache.CuratorCacheImpl.lambda$callListeners$10(CuratorCacheImpl.java:293)
   	at java.util.concurrent.CompletableFuture$AsyncRun.run$$$capture(CompletableFuture.java:1640)
   	at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:748)
   [INFO ] 2022-06-21 12:30:20.235 [_finished_check_Worker-1] o.a.c.f.imps.CuratorFrameworkImpl - Starting
   [INFO ] 2022-06-21 12:30:20.236 [_finished_check_Worker-1] org.apache.zookeeper.ZooKeeper - Initiating client connection, connectString=localhost:2181 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@22084dd5
   [INFO ] 2022-06-21 12:30:20.236 [_finished_check_Worker-1] o.apache.zookeeper.ClientCnxnSocket - jute.maxbuffer value is 1048575 Bytes
   [INFO ] 2022-06-21 12:30:20.236 [_finished_check_Worker-1] org.apache.zookeeper.ClientCnxn - zookeeper.request.timeout value is 0. feature enabled=false
   [INFO ] 2022-06-21 12:30:20.237 [_finished_check_Worker-1-SendThread(localhost:2181)] org.apache.zookeeper.ClientCnxn - Opening socket connection to server localhost/127.0.0.1:2181.
   [INFO ] 2022-06-21 12:30:20.237 [_finished_check_Worker-1-SendThread(localhost:2181)] org.apache.zookeeper.ClientCnxn - SASL config status: Will not attempt to authenticate using SASL (unknown error)
   [INFO ] 2022-06-21 12:30:20.237 [_finished_check_Worker-1] o.a.c.f.imps.CuratorFrameworkImpl - Default schema
   [INFO ] 2022-06-21 12:30:20.237 [_finished_check_Worker-1-SendThread(localhost:2181)] org.apache.zookeeper.ClientCnxn - Socket connection established, initiating session, client: /127.0.0.1:55340, server: localhost/127.0.0.1:2181
   [INFO ] 2022-06-21 12:30:20.242 [_finished_check_Worker-1-SendThread(localhost:2181)] org.apache.zookeeper.ClientCnxn - Session establishment complete on server localhost/127.0.0.1:2181, session id = 0x1000000462a009f, negotiated timeout = 40000
   [INFO ] 2022-06-21 12:30:20.243 [_finished_check_Worker-1-EventThread] o.a.c.f.state.ConnectionStateManager - State change: CONNECTED
   [INFO ] 2022-06-21 12:30:20.246 [_finished_check_Worker-1-EventThread] o.a.c.framework.imps.EnsembleTracker - New config event received: {}
   [INFO ] 2022-06-21 12:30:20.246 [_finished_check_Worker-1-EventThread] o.a.c.framework.imps.EnsembleTracker - New config event received: {}
   ```
   
   ### 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] strongduanmu closed issue #18481: NullPointerException occurs when startup ShardingSphere proxy

Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #18481: NullPointerException occurs when startup ShardingSphere proxy
URL: https://github.com/apache/shardingsphere/issues/18481


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