-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Closed
Description
- To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Environment
- Dubbo version: 2.7.12
- Operating System version: macOS
- Java version: 8
Steps to reproduce this issue
- dubbo-provider.xml
<dubbo:registry id="zkRegistry" protocol="zookeeper" address="127.0.0.1:2181">
<dubbo:parameter key="registry-type" value="service"/>
</dubbo:registry>
<dubbo:metadata-report address="zookeeper://127.0.0.1:2181"/>
<dubbo:config-center address="zookeeper://127.0.0.1:2181"/>
- start provider
- print error log
2021-06-16 13:17:31,086 [Dubbo-framework-scheduler-thread-1] ERROR org.apache.dubbo.config.bootstrap.DubboBootstrap (DubboBootstrap.java:1172) - [DUBBO] refresh metadata and instance failed, dubbo version: 2.7.12, current host: 172.23.233.52
java.lang.NullPointerException
at org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.calInstanceRevision(ServiceInstanceMetadataUtils.java:249)
at org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.lambda$refreshMetadataAndInstance$6(ServiceInstanceMetadataUtils.java:272)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.refreshMetadataAndInstance(ServiceInstanceMetadataUtils.java:271)
at org.apache.dubbo.config.bootstrap.DubboBootstrap.lambda$registerServiceInstance$20(DubboBootstrap.java:1170)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
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)
also 2.7.11 worked will, so i think this is a bug
Activity
lkxiaolou commentedon Jun 16, 2021
I got the cause of the problem, in the
org.apache.dubbo.registry.client.AbstractServiceDiscovery
2.7.11

2.7.12

ZookeeperServiceDiscovery depends on
curator-x-discovery
, but my project doesn't depends on, sodoRegister
cause exception, 2.7.12 exception first leads to null point exceptionCrazyHZM commentedon Jun 16, 2021
Please give your dependencies, it is generally recommended to directly rely on
dubbo-registry-zookeeper
.lkxiaolou commentedon Jun 16, 2021
yes, add
dubbo-registry-zookeeper
works, but the error was confused, why not printclass not found
exception or log ?AlbumenJ commentedon Jun 21, 2021
Service Discovery model is no longer mantained in 2.7.x version, please upgrade to 3.0.x to using it.
If you found this issue still occurred in 3.0.x, please feel free to submit a new PR.
GreenPlumBoilAlcohol commentedon Jun 30, 2022
想使用dubbo这个RPC框架,但是参考官网中的测试用例和文档教程一直报错,各种报错,在排除了一堆后,还有一个始终无法解决的错误java.lang.NoClassDefFoundError: org/apache/curator/x/discovery/ServiceDiscoveryBuilder。看了你的评论后,加上了dubbo-registry-zookeeper依赖。终于正常运行了。非常感谢