You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "shining-stars-lk (via GitHub)" <gi...@apache.org> on 2024/11/08 05:38:24 UTC

[I] java.lang.NullPointerException: null [shardingsphere]

shining-stars-lk opened a new issue, #33590:
URL: https://github.com/apache/shardingsphere/issues/33590

   ## Question
   A null pointer error occurred after the project connected to the shardingproxy, but it was successfully started
   
   ## Version
   - springboot:2.3.12.RELEASE
   - Shardingsphere:5.3.2
   
   ## errorMessage
   
   [log-service] 2024-11-08 11:39:49 ERROR default:239 - Exception thrown by subscriber method renew(org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.data.event.SchemaDataAddedEvent) on subscriber org.apache.shardingsphere.mode.manager.cluster.coordinator.subscriber.DatabaseChangedSubscriber@38d87cfa when dispatching event: org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.data.event.SchemaDataAddedEvent@263806bc
   java.lang.NullPointerException: null
   	at org.apache.shardingsphere.mode.manager.ContextManager.addShardingSphereSchemaData(ContextManager.java:592) ~[shardingsphere-mode-core-5.3.2.jar:5.3.2]
   	at org.apache.shardingsphere.mode.manager.cluster.coordinator.subscriber.DatabaseChangedSubscriber.renew(DatabaseChangedSubscriber.java:70) ~[shardingsphere-cluster-mode-core-5.3.2.jar:5.3.2]
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_361]
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_361]
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_361]
   	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_361]
   	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[guava-20.0.jar:?]
   	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[guava-20.0.jar:?]
   	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[guava-20.0.jar:?]
   	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:435) ~[guava-20.0.jar:?]
   	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[guava-20.0.jar:?]
   	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[guava-20.0.jar:?]
   	at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[guava-20.0.jar:?]
   	at org.apache.shardingsphere.infra.util.eventbus.EventBusContext.post(EventBusContext.java:51) ~[shardingsphere-infra-util-5.3.2.jar:5.3.2]
   	at java.util.Optional.ifPresent(Optional.java:159) ~[?:1.8.0_361]
   	at org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.GovernanceWatcherFactory.lambda$watch$0(GovernanceWatcherFactory.java:55) ~[shardingsphere-cluster-mode-core-5.3.2.jar:5.3.2]
   	at org.apache.shardingsphere.mode.repository.cluster.zookeeper.ZookeeperRepository.lambda$watch$0(ZookeeperRepository.java:244) ~[shardingsphere-cluster-mode-repository-zookeeper-5.3.2.jar:5.3.2]
   	at org.apache.curator.framework.recipes.cache.TreeCacheListenerWrapper.sendEvent(TreeCacheListenerWrapper.java:61) ~[curator-recipes-5.6.0.jar:5.6.0]
   	at org.apache.curator.framework.recipes.cache.TreeCacheListenerWrapper.event(TreeCacheListenerWrapper.java:37) ~[curator-recipes-5.6.0.jar:5.6.0]
   	at org.apache.curator.framework.recipes.cache.CuratorCacheListenerBuilderImpl$2.lambda$event$0(CuratorCacheListenerBuilderImpl.java:128) ~[curator-recipes-5.6.0.jar:5.6.0]
   	at java.util.ArrayList.forEach(ArrayList.java:1259) ~[?:1.8.0_361]
   	at org.apache.curator.framework.recipes.cache.CuratorCacheListenerBuilderImpl$2.event(CuratorCacheListenerBuilderImpl.java:128) ~[curator-recipes-5.6.0.jar:5.6.0]
   	at org.apache.curator.framework.recipes.cache.CuratorCacheImpl.lambda$putStorage$7(CuratorCacheImpl.java:238) ~[curator-recipes-5.6.0.jar:5.6.0]
   	at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:82) ~[curator-framework-5.6.0.jar:5.6.0]
   	at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:80) ~[curator-framework-5.6.0.jar:5.6.0]
   	at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:81) ~[curator-framework-5.6.0.jar:5.6.0]
   	at org.apache.curator.framework.recipes.cache.CuratorCacheImpl.lambda$callListeners$10(CuratorCacheImpl.java:249) ~[curator-recipes-5.6.0.jar:5.6.0]
   	at java.util.concurrent.CompletableFuture$AsyncRun.run$$$capture(CompletableFuture.java:1640) [?:1.8.0_361]
   	at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java) [?:1.8.0_361]
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_361]
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_361]
   	at java.lang.Thread.run(Thread.java:750) [?:1.8.0_361]
   
   


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


Re: [I] java.lang.NullPointerException: null [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #33590:
URL: https://github.com/apache/shardingsphere/issues/33590#issuecomment-2467087116

   There are currently no plans to adapt to closed-source branch databases.


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


Re: [I] java.lang.NullPointerException: null [shardingsphere]

Posted by "shining-stars-lk (via GitHub)" <gi...@apache.org>.
shining-stars-lk commented on issue #33590:
URL: https://github.com/apache/shardingsphere/issues/33590#issuecomment-2467068132

   ## ProjectConfiguration
   spring.datasource.driver-class-name = org.apache.shardingsphere.driver.ShardingSphereDriver
   spring.datasource.url = jdbc:shardingsphere:classpath:local/sharding.yaml
   spring.datasource.type = com.alibaba.druid.pool.DruidDataSource
   
   ## shardingproxyConfiguration
     ds_0:
       url: jdbc:postgresql://192.168.12.242:6432/mocirelog?currentSchema=mocirelog
       username: xxx
       password: xxx
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
   rules:
   - !SHARDING
     tables:
       mcr_rongcloud_message_history:
         actualDataNodes: ds_0.mcr_rongcloud_message_history_$->{0..1}
         tableStrategy:
           standard:
             shardingColumn: object_id
             shardingAlgorithmName: crc32_mod
     shardingAlgorithms:
       crc32_mod:
         type: CRC32_MOD
   
   ## databaseInformation
   
   The real database to connect to is Vastbase, connecting to mysql is fine, but connecting to Vastbase is an error
   


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


Re: [I] java.lang.NullPointerException: null [shardingsphere]

Posted by "shining-stars-lk (via GitHub)" <gi...@apache.org>.
shining-stars-lk commented on issue #33590:
URL: https://github.com/apache/shardingsphere/issues/33590#issuecomment-2467094586

   Can you tell me what the error was? I'll check it out myself. I expect problems like subscribing to shardingproxy


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


Re: [I] java.lang.NullPointerException: null [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #33590:
URL: https://github.com/apache/shardingsphere/issues/33590#issuecomment-2466232215

   What is the configuration and database DDL?


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


Re: [I] java.lang.NullPointerException: null [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #33590: java.lang.NullPointerException: null
URL: https://github.com/apache/shardingsphere/issues/33590


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