<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.9-SNAPSHOT</li>
<li>Operating System version: MacOS 10.14.5</li>
<li>Java version: 11.0.2</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>run the org.apache.dubbo.demo.provider.Application in module 'dubbo-demo-xml'</li>
<li>run the org.apache.dubbo.demo.consumer.Application in module 'dubbo-demo-xml'</li>
<li>Caused by: java.lang.NullPointerException<br>
at org.apache.dubbo.registry.client.InstanceAddressURL.addConsumerParams(InstanceAddressURL.java:284)</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">consumer run normally and receives response from provider</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">The NullPointerException occurs .</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Exception in thread &quot;main&quot; org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoService': FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:176)
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:101)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1827)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1265)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)
	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1115)
	at org.apache.dubbo.demo.consumer.Application.main(Application.java:34)
Caused by: java.lang.NullPointerException
	at org.apache.dubbo.registry.client.InstanceAddressURL.addConsumerParams(InstanceAddressURL.java:284)
	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.toInvokers(ServiceDiscoveryRegistryDirectory.java:157)
	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.refreshInvoker(ServiceDiscoveryRegistryDirectory.java:109)
	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.notify(ServiceDiscoveryRegistryDirectory.java:89)
	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.lambda$notifyAddressChanged$3(ServiceInstancesChangedListener.java:182)
	at java.util.HashMap.forEach(HashMap.java:1289)
	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.notifyAddressChanged(ServiceInstancesChangedListener.java:180)
	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.onEvent(ServiceInstancesChangedListener.java:145)
	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.lambda$subscribeURLs$3(ServiceDiscoveryRegistry.java:323)
	at java.lang.Iterable.forEach(Iterable.java:75)
	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.subscribeURLs(ServiceDiscoveryRegistry.java:321)
	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.doSubscribe(ServiceDiscoveryRegistry.java:266)
	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.subscribe(ServiceDiscoveryRegistry.java:255)
	at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:105)
	at org.apache.dubbo.registry.integration.DynamicDirectory.subscribe(DynamicDirectory.java:137)
	at org.apache.dubbo.registry.integration.InterfaceCompatibleRegistryProtocol.getServiceDiscoveryInvoker(InterfaceCompatibleRegistryProtocol.java:93)
	at org.apache.dubbo.registry.integration.InterfaceCompatibleRegistryProtocol.doRefer(InterfaceCompatibleRegistryProtocol.java:71)
	at org.apache.dubbo.registry.client.RegistryProtocol.refer(RegistryProtocol.java:452)
	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:72)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:161)
	at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java)
	at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:366)
	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:304)
	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:204)
	at org.apache.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:68)
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:169)
	... 7 more"><pre class="notranslate"><code class="notranslate">Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoService': FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:176)
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:101)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1827)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1265)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)
	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1115)
	at org.apache.dubbo.demo.consumer.Application.main(Application.java:34)
Caused by: java.lang.NullPointerException
	at org.apache.dubbo.registry.client.InstanceAddressURL.addConsumerParams(InstanceAddressURL.java:284)
	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.toInvokers(ServiceDiscoveryRegistryDirectory.java:157)
	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.refreshInvoker(ServiceDiscoveryRegistryDirectory.java:109)
	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.notify(ServiceDiscoveryRegistryDirectory.java:89)
	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.lambda$notifyAddressChanged$3(ServiceInstancesChangedListener.java:182)
	at java.util.HashMap.forEach(HashMap.java:1289)
	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.notifyAddressChanged(ServiceInstancesChangedListener.java:180)
	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.onEvent(ServiceInstancesChangedListener.java:145)
	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.lambda$subscribeURLs$3(ServiceDiscoveryRegistry.java:323)
	at java.lang.Iterable.forEach(Iterable.java:75)
	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.subscribeURLs(ServiceDiscoveryRegistry.java:321)
	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.doSubscribe(ServiceDiscoveryRegistry.java:266)
	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.subscribe(ServiceDiscoveryRegistry.java:255)
	at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:105)
	at org.apache.dubbo.registry.integration.DynamicDirectory.subscribe(DynamicDirectory.java:137)
	at org.apache.dubbo.registry.integration.InterfaceCompatibleRegistryProtocol.getServiceDiscoveryInvoker(InterfaceCompatibleRegistryProtocol.java:93)
	at org.apache.dubbo.registry.integration.InterfaceCompatibleRegistryProtocol.doRefer(InterfaceCompatibleRegistryProtocol.java:71)
	at org.apache.dubbo.registry.client.RegistryProtocol.refer(RegistryProtocol.java:452)
	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:72)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:161)
	at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java)
	at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:366)
	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:304)
	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:204)
	at org.apache.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:68)
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:169)
	... 7 more
</code></pre></div>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.5</li>
<li>Operating System version: macOS 10.15.3</li>
<li>Java version: 1.8.241</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">在dubbo和dubbo-admin中创建MetadataIdentifier对象的参数不统一，导致admin一直提示"无元数据信息，请升级至Dubbo2.7及以上版本，或者查看application.properties中关于config center的配置，详见 这里"</p>
<p dir="auto">org.apache.dubbo.metadata.store.RemoteWritableMetadataService#83</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="getMetadataReport().storeProviderMetadata(new MetadataIdentifier(providerUrl.getServiceInterface(),
                        providerUrl.getParameter(VERSION_KEY), providerUrl.getParameter(GROUP_KEY),
                        null, null), serviceDefinition);"><pre class="notranslate"><span class="pl-en">getMetadataReport</span>().<span class="pl-en">storeProviderMetadata</span>(<span class="pl-k">new</span> <span class="pl-smi">MetadataIdentifier</span>(<span class="pl-s1">providerUrl</span>.<span class="pl-en">getServiceInterface</span>(),
                        <span class="pl-s1">providerUrl</span>.<span class="pl-en">getParameter</span>(<span class="pl-c1">VERSION_KEY</span>), <span class="pl-s1">providerUrl</span>.<span class="pl-en">getParameter</span>(<span class="pl-c1">GROUP_KEY</span>),
                        <span class="pl-c1">null</span>, <span class="pl-c1">null</span>), <span class="pl-s1">serviceDefinition</span>);</pre></div>
<p dir="auto">org.apache.dubbo.admin.controller.ServiceController#91</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="MetadataIdentifier identifier = new MetadataIdentifier(interfaze, version, group, Constants.PROVIDER_SIDE, application);"><pre class="notranslate"><span class="pl-smi">MetadataIdentifier</span> <span class="pl-s1">identifier</span> = <span class="pl-k">new</span> <span class="pl-smi">MetadataIdentifier</span>(<span class="pl-s1">interfaze</span>, <span class="pl-s1">version</span>, <span class="pl-s1">group</span>, <span class="pl-smi">Constants</span>.<span class="pl-c1">PROVIDER_SIDE</span>, <span class="pl-s1">application</span>);</pre></div>