Environment
- Dubbo version: dubbo2.7.9
- Operating System version: macos
- Java version: 1.8
Steps to reproduce this issue
private static void startWithBootstrap() {
ServiceConfig<DemoServiceImpl> service = new ServiceConfig<>();
service.setInterface(DemoService.class);
service.setRef(new DemoServiceImpl());
DubboBootstrap bootstrap = DubboBootstrap.getInstance();
bootstrap.application(new ApplicationConfig("dubbo-demo-api-provider"))
.registry(new RegistryConfig("zookeeper://127.0.0.1:2181?registry-type=service"))
.service(service)
.start()
.await();
}
Expected Result
start successful
Actual Result
What actually happens?
If there is an exception, please attach the exception trace:
Exception in thread "main" java.lang.NullPointerException
at org.apache.dubbo.registry.client.metadata.store.InMemoryWritableMetadataService.exportURL(InMemoryWritableMetadataService.java:129)
at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.doRegister(ServiceDiscoveryRegistry.java:213)
at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.register(ServiceDiscoveryRegistry.java:205)
at org.apache.dubbo.registry.ListenerRegistryWrapper.register(ListenerRegistryWrapper.java:57)
at org.apache.dubbo.registry.integration.RegistryProtocol.register(RegistryProtocol.java:181)
at org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:217)
at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:62)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:72)
at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:494)
at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:327)
at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:302)
at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:203)
at org.apache.dubbo.config.bootstrap.DubboBootstrap.lambda$exportServices$14(DubboBootstrap.java:1094)
at java.util.HashMap$Values.forEach(HashMap.java:981)
at org.apache.dubbo.config.bootstrap.DubboBootstrap.exportServices(DubboBootstrap.java:1081)
at org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:895)
at org.apache.dubbo.demo.provider.Application.startWithBootstrap(Application.java:49)
at org.apache.dubbo.demo.provider.Application.main(Application.java:32)
Environment
Steps to reproduce this issue
Expected Result
start successful
Actual Result
What actually happens?
If there is an exception, please attach the exception trace: