<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: apache-dubbo-2.7.4.1</li>
<li>Operating System version: mac os</li>
<li>Java version: jdk1.8.0_211</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>when running demo dubbo-demo-xml-provider a null pointer appears</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  [27/12/19 00:41:45:876 CST] main  INFO config.AbstractConfig:  [DUBBO] The service ready on spring started. service: org.apache.dubbo.demo.DemoService, dubbo version: , current host: 192.168.0.100
Exception in thread &quot;main&quot; java.lang.NullPointerException
	at org.apache.dubbo.config.AbstractInterfaceConfig.lambda$null$7(AbstractInterfaceConfig.java:632)
	at java.util.Optional.orElseGet(Optional.java:267)
	at org.apache.dubbo.config.AbstractInterfaceConfig.lambda$useRegistryForConfigIfNecessary$8(AbstractInterfaceConfig.java:620)
	at java.util.Optional.ifPresent(Optional.java:159)
	at org.apache.dubbo.config.AbstractInterfaceConfig.useRegistryForConfigIfNecessary(AbstractInterfaceConfig.java:618)
	at org.apache.dubbo.config.AbstractInterfaceConfig.checkRegistry(AbstractInterfaceConfig.java:208)
	at org.apache.dubbo.config.ServiceConfig.checkAndUpdateSubConfigs(ServiceConfig.java:303)
	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:370)
	at org.apache.dubbo.config.spring.ServiceBean.export(ServiceBean.java:336)
	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:114)
	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:60)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
	at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:83)
	at org.apache.dubbo.demo.provider.Application.main(Application.java:30)
[27/12/19 00:41:45:950 CST] Thread-0  INFO support.ClassPathXmlApplicationContext: Closing org.springframework.context.support.ClassPathXmlApplicationContext@2d363fb3: startup date [Fri Dec 27 00:41:44 CST 2019]; root of context hierarchy
[27/12/19 00:41:45:955 CST] Thread-0  INFO support.AbstractRegistryFactory:  [DUBBO] Close all registries [], dubbo version: , current host: 192.168.0.100
"><pre class="notranslate"><code class="notranslate">  [27/12/19 00:41:45:876 CST] main  INFO config.AbstractConfig:  [DUBBO] The service ready on spring started. service: org.apache.dubbo.demo.DemoService, dubbo version: , current host: 192.168.0.100
Exception in thread "main" java.lang.NullPointerException
	at org.apache.dubbo.config.AbstractInterfaceConfig.lambda$null$7(AbstractInterfaceConfig.java:632)
	at java.util.Optional.orElseGet(Optional.java:267)
	at org.apache.dubbo.config.AbstractInterfaceConfig.lambda$useRegistryForConfigIfNecessary$8(AbstractInterfaceConfig.java:620)
	at java.util.Optional.ifPresent(Optional.java:159)
	at org.apache.dubbo.config.AbstractInterfaceConfig.useRegistryForConfigIfNecessary(AbstractInterfaceConfig.java:618)
	at org.apache.dubbo.config.AbstractInterfaceConfig.checkRegistry(AbstractInterfaceConfig.java:208)
	at org.apache.dubbo.config.ServiceConfig.checkAndUpdateSubConfigs(ServiceConfig.java:303)
	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:370)
	at org.apache.dubbo.config.spring.ServiceBean.export(ServiceBean.java:336)
	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:114)
	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:60)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
	at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:83)
	at org.apache.dubbo.demo.provider.Application.main(Application.java:30)
[27/12/19 00:41:45:950 CST] Thread-0  INFO support.ClassPathXmlApplicationContext: Closing org.springframework.context.support.ClassPathXmlApplicationContext@2d363fb3: startup date [Fri Dec 27 00:41:44 CST 2019]; root of context hierarchy
[27/12/19 00:41:45:955 CST] Thread-0  INFO support.AbstractRegistryFactory:  [DUBBO] Close all registries [], dubbo version: , current host: 192.168.0.100

</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/incubator-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/incubator-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: master branch</li>
<li>Operating System version: macos</li>
<li>Java version: java11</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li><code class="notranslate">./mvnw package  -DskipTests -Pjava8-vm-args -Prelease</code></li>
</ol>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">build success</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">build failed</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:jar (attach-javadoc) on project dubbo: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 1 - /Users/xxx/Documents/incubator-dubbo/dubbo-common/src/main/java/org/apache/dubbo/common/logger/log4j2/Log4j2LoggerAdapter.java:23: error: package org.apache.logging.log4j does not exist
[ERROR] import org.apache.logging.log4j.LogManager;
[ERROR]                                ^
[ERROR] /Users/xxx/Documents/incubator-dubbo/dubbo-common/src/main/java/org/apache/dubbo/common/logger/log4j2/Log4j2LoggerAdapter.java:35: error: package org.apache.logging.log4j does not exist
[ERROR]     private static org.apache.logging.log4j.Level toLog4j2Level(Level level) {
[ERROR]                                            ^
[ERROR] /Users/xxx/Documents/incubator-dubbo/dubbo-common/src/main/java/org/apache/dubbo/common/logger/log4j2/Log4j2LoggerAdapter.java:57: error: package org.apache.logging.log4j does not exist
[ERROR]     private static Level fromLog4j2Level(org.apache.logging.log4j.Level level) {
[ERROR]                                                                  ^
[ERROR] /Users/xxx/Documents/incubator-dubbo/dubbo-common/src/main/java/org/apache/dubbo/common/logger/log4j2/Log4j2Logger.java:23: error: package org.apache.logging.log4j does not exist
[ERROR]     private final org.apache.logging.log4j.Logger logger;
[ERROR]                                           ^
[ERROR] /Users/xxx/Documents/incubator-dubbo/dubbo-common/src/main/java/org/apache/dubbo/common/logger/log4j2/Log4j2Logger.java:25: error: package org.apache.logging.log4j does not exist
[ERROR]     public Log4j2Logger(org.apache.logging.log4j.Logger logger) {
[ERROR]                                                 ^
[ERROR]
[ERROR] Command line was: /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/bin/javadoc @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in '/Users/xxx/Documents/incubator-dubbo/dubbo-all/target/apidocs' dir.
[ERROR]
[ERROR] -&gt; [Help 1]"><pre class="notranslate"><code class="notranslate">[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:jar (attach-javadoc) on project dubbo: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 1 - /Users/xxx/Documents/incubator-dubbo/dubbo-common/src/main/java/org/apache/dubbo/common/logger/log4j2/Log4j2LoggerAdapter.java:23: error: package org.apache.logging.log4j does not exist
[ERROR] import org.apache.logging.log4j.LogManager;
[ERROR]                                ^
[ERROR] /Users/xxx/Documents/incubator-dubbo/dubbo-common/src/main/java/org/apache/dubbo/common/logger/log4j2/Log4j2LoggerAdapter.java:35: error: package org.apache.logging.log4j does not exist
[ERROR]     private static org.apache.logging.log4j.Level toLog4j2Level(Level level) {
[ERROR]                                            ^
[ERROR] /Users/xxx/Documents/incubator-dubbo/dubbo-common/src/main/java/org/apache/dubbo/common/logger/log4j2/Log4j2LoggerAdapter.java:57: error: package org.apache.logging.log4j does not exist
[ERROR]     private static Level fromLog4j2Level(org.apache.logging.log4j.Level level) {
[ERROR]                                                                  ^
[ERROR] /Users/xxx/Documents/incubator-dubbo/dubbo-common/src/main/java/org/apache/dubbo/common/logger/log4j2/Log4j2Logger.java:23: error: package org.apache.logging.log4j does not exist
[ERROR]     private final org.apache.logging.log4j.Logger logger;
[ERROR]                                           ^
[ERROR] /Users/xxx/Documents/incubator-dubbo/dubbo-common/src/main/java/org/apache/dubbo/common/logger/log4j2/Log4j2Logger.java:25: error: package org.apache.logging.log4j does not exist
[ERROR]     public Log4j2Logger(org.apache.logging.log4j.Logger logger) {
[ERROR]                                                 ^
[ERROR]
[ERROR] Command line was: /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/bin/javadoc @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in '/Users/xxx/Documents/incubator-dubbo/dubbo-all/target/apidocs' dir.
[ERROR]
[ERROR] -&gt; [Help 1]
</code></pre></div>
<h3 dir="auto">Solution</h3>
<p dir="auto"><code class="notranslate">log4j-core</code> was defined in <code class="notranslate">dubbo-common/pom.xml</code> as <code class="notranslate">provied</code><br>
change to default scope <code class="notranslate">compile</code></p>