<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>
<p dir="auto">:: Dubbo Spring Boot (v2.7.0) : <a href="https://github.com/apache/incubator-dubbo-spring-boot-project">https://github.com/apache/incubator-dubbo-spring-boot-project</a><br>
:: Dubbo (vdubbo-2.7.1.RELEASE) : <a href="https://github.com/apache/incubator-dubbo">https://github.com/apache/incubator-dubbo</a><br>
:: Discuss group : <a href="mailto:dev@dubbo.apache.org">dev@dubbo.apache.org</a></p>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">application.yaml</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="dubbo:
  metadata-report:
    address: zookeeper://127.0.0.1:2181
  registry:
    address: zookeeper://127.0.0.1:2181
    client: curator
    simplified: true
  protocol:
    serialization: protostuff
    # name: dubbo
  consumer:
    timeout: 60000
    check: false
    validation: true
    filter: tracing"><pre class="notranslate"><span class="pl-ent">dubbo</span>:
  <span class="pl-ent">metadata-report</span>:
    <span class="pl-ent">address</span>: <span class="pl-s">zookeeper://127.0.0.1:2181</span>
  <span class="pl-ent">registry</span>:
    <span class="pl-ent">address</span>: <span class="pl-s">zookeeper://127.0.0.1:2181</span>
    <span class="pl-ent">client</span>: <span class="pl-s">curator</span>
    <span class="pl-ent">simplified</span>: <span class="pl-c1">true</span>
  <span class="pl-ent">protocol</span>:
    <span class="pl-ent">serialization</span>: <span class="pl-s">protostuff</span>
    <span class="pl-c"><span class="pl-c">#</span> name: dubbo</span>
  <span class="pl-ent">consumer</span>:
    <span class="pl-ent">timeout</span>: <span class="pl-c1">60000</span>
    <span class="pl-ent">check</span>: <span class="pl-c1">false</span>
    <span class="pl-ent">validation</span>: <span class="pl-c1">true</span>
    <span class="pl-ent">filter</span>: <span class="pl-s">tracing</span></pre></div>
<p dir="auto">If I comment out the name configuration in the protocol, the following exception will occur.</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="2019-03-27 23:57:10.641  WARN [-,,,] 3137 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.dubbo.config.ProtocolConfig#0': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Invalid name=&quot;org.apache.dubbo.config.ProtocolConfig#0&quot; contains illegal character, only digit, letter, '-', '_' or '.' is legal.
rg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.dubbo.config.ProtocolConfig#0': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Invalid name=&quot;org.apache.dubbo.config.ProtocolConfig#0&quot; contains illegal character, only digit, letter, '-', '_' or '.' is legal.
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
	at com.jidian.cosalon.rest.consumer.RestConsumerBootifulKt.main(RestConsumerBootiful.kt:14)
Caused by: java.lang.IllegalStateException: Invalid name=&quot;org.apache.dubbo.config.ProtocolConfig#0&quot; contains illegal character, only digit, letter, '-', '_' or '.' is legal.
	at org.apache.dubbo.config.AbstractConfig.checkProperty(AbstractConfig.java:380)
	at org.apache.dubbo.config.AbstractConfig.checkName(AbstractConfig.java:338)
	at org.apache.dubbo.config.ProtocolConfig.setName(ProtocolConfig.java:221)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:246)
	at org.apache.dubbo.config.spring.context.config.NamePropertyDefaultValueDubboConfigBeanCustomizer.customize(NamePropertyDefaultValueDubboConfigBeanCustomizer.java:73)
	at org.apache.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor.customize(DubboConfigBindingBeanPostProcessor.java:117)
	at org.apache.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor.postProcessBeforeInitialization(DubboConfigBindingBeanPostProcessor.java:96)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:414)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1754)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
	... 15 common frames omitted"><pre class="notranslate"><span class="pl-c1">2019</span>-<span class="pl-c1">03</span>-<span class="pl-c1">27</span> <span class="pl-c1">23</span>:<span class="pl-c1">57</span>:<span class="pl-c1">10.641</span>  <span class="pl-c1">WARN</span> [-,,,] <span class="pl-c1">3137</span> --- [           <span class="pl-s1">main</span>] <span class="pl-s1">ConfigServletWebServerApplicationContext</span> : <span class="pl-smi">Exception</span> <span class="pl-s1">encountered</span> <span class="pl-smi">during</span> <span class="pl-s1">context</span> <span class="pl-s1">initialization</span> - <span class="pl-smi">cancelling</span> <span class="pl-s1">refresh</span> <span class="pl-s1">attempt</span>: <span class="pl-smi">org</span>.<span class="pl-smi">springframework</span>.<span class="pl-smi">beans</span>.<span class="pl-smi">factory</span>.<span class="pl-smi">BeanCreationException</span>: <span class="pl-s1">Error</span> <span class="pl-s1">creating</span> <span class="pl-s1">bean</span> <span class="pl-k">with</span> <span class="pl-s1">name</span> <span class="pl-s">'org.apache.dubbo.config.ProtocolConfig#0'</span>: <span class="pl-s1">Initialization</span> <span class="pl-s1">of</span> <span class="pl-s1">bean</span> <span class="pl-s1">failed</span>; <span class="pl-smi">nested</span> <span class="pl-s1">exception</span> <span class="pl-smi">is</span> <span class="pl-s1">java</span>.<span class="pl-s1">lang</span>.<span class="pl-s1">IllegalStateException</span>: <span class="pl-s1">Invalid</span> <span class="pl-s1">name</span>=<span class="pl-s">"org.apache.dubbo.config.ProtocolConfig#0"</span> <span class="pl-smi">contains</span> <span class="pl-s1">illegal</span> <span class="pl-s1">character</span>, <span class="pl-s1">only</span> <span class="pl-s1">digit</span>, <span class="pl-s1">letter</span>, <span class="pl-s">'-'</span>, <span class="pl-s">'_'</span> <span class="pl-s1">or</span> <span class="pl-s">'.'</span> <span class="pl-s1">is</span> <span class="pl-smi">legal</span>.
<span class="pl-smi">rg</span>.<span class="pl-smi">springframework</span>.<span class="pl-smi">beans</span>.<span class="pl-smi">factory</span>.<span class="pl-smi">BeanCreationException</span>: <span class="pl-s1">Error</span> <span class="pl-s1">creating</span> <span class="pl-s1">bean</span> <span class="pl-s1">with</span> <span class="pl-s1">name</span> <span class="pl-s">'org.apache.dubbo.config.ProtocolConfig#0'</span>: <span class="pl-s1">Initialization</span> <span class="pl-s1">of</span> <span class="pl-s1">bean</span> <span class="pl-s1">failed</span>; <span class="pl-smi">nested</span> <span class="pl-s1">exception</span> <span class="pl-smi">is</span> <span class="pl-s1">java</span>.<span class="pl-s1">lang</span>.<span class="pl-s1">IllegalStateException</span>: <span class="pl-s1">Invalid</span> <span class="pl-s1">name</span>=<span class="pl-s">"org.apache.dubbo.config.ProtocolConfig#0"</span> <span class="pl-smi">contains</span> <span class="pl-s1">illegal</span> <span class="pl-s1">character</span>, <span class="pl-s1">only</span> <span class="pl-s1">digit</span>, <span class="pl-s1">letter</span>, <span class="pl-s">'-'</span>, <span class="pl-s">'_'</span> <span class="pl-s1">or</span> <span class="pl-s">'.'</span> <span class="pl-s1">is</span> <span class="pl-smi">legal</span>.
	<span class="pl-smi">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">beans</span>.<span class="pl-s1">factory</span>.<span class="pl-s1">support</span>.<span class="pl-s1">AbstractAutowireCapableBeanFactory</span>.<span class="pl-s1">doCreateBean</span>(<span class="pl-smi">AbstractAutowireCapableBeanFactory</span>.<span class="pl-smi">java</span>:<span class="pl-c1">601</span>)
	<span class="pl-smi">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">beans</span>.<span class="pl-s1">factory</span>.<span class="pl-s1">support</span>.<span class="pl-s1">AbstractAutowireCapableBeanFactory</span>.<span class="pl-en">createBean</span>(<span class="pl-smi">AbstractAutowireCapableBeanFactory</span>.<span class="pl-smi">java</span>:<span class="pl-c1">515</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">beans</span>.<span class="pl-s1">factory</span>.<span class="pl-s1">support</span>.<span class="pl-s1">AbstractBeanFactory</span>.<span class="pl-en">lambda$doGetBean$0</span>(<span class="pl-smi">AbstractBeanFactory</span>.<span class="pl-smi">java</span>:<span class="pl-c1">320</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">beans</span>.<span class="pl-s1">factory</span>.<span class="pl-s1">support</span>.<span class="pl-s1">DefaultSingletonBeanRegistry</span>.<span class="pl-en">getSingleton</span>(<span class="pl-smi">DefaultSingletonBeanRegistry</span>.<span class="pl-smi">java</span>:<span class="pl-c1">222</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">beans</span>.<span class="pl-s1">factory</span>.<span class="pl-s1">support</span>.<span class="pl-s1">AbstractBeanFactory</span>.<span class="pl-en">doGetBean</span>(<span class="pl-smi">AbstractBeanFactory</span>.<span class="pl-smi">java</span>:<span class="pl-c1">318</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">beans</span>.<span class="pl-s1">factory</span>.<span class="pl-s1">support</span>.<span class="pl-s1">AbstractBeanFactory</span>.<span class="pl-en">getBean</span>(<span class="pl-smi">AbstractBeanFactory</span>.<span class="pl-smi">java</span>:<span class="pl-c1">199</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">beans</span>.<span class="pl-s1">factory</span>.<span class="pl-s1">support</span>.<span class="pl-s1">DefaultListableBeanFactory</span>.<span class="pl-en">preInstantiateSingletons</span>(<span class="pl-smi">DefaultListableBeanFactory</span>.<span class="pl-smi">java</span>:<span class="pl-c1">849</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">context</span>.<span class="pl-s1">support</span>.<span class="pl-s1">AbstractApplicationContext</span>.<span class="pl-en">finishBeanFactoryInitialization</span>(<span class="pl-smi">AbstractApplicationContext</span>.<span class="pl-smi">java</span>:<span class="pl-c1">877</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">context</span>.<span class="pl-s1">support</span>.<span class="pl-s1">AbstractApplicationContext</span>.<span class="pl-en">refresh</span>(<span class="pl-smi">AbstractApplicationContext</span>.<span class="pl-smi">java</span>:<span class="pl-c1">549</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">boot</span>.<span class="pl-s1">web</span>.<span class="pl-s1">servlet</span>.<span class="pl-s1">context</span>.<span class="pl-s1">ServletWebServerApplicationContext</span>.<span class="pl-en">refresh</span>(<span class="pl-smi">ServletWebServerApplicationContext</span>.<span class="pl-smi">java</span>:<span class="pl-c1">142</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">boot</span>.<span class="pl-s1">SpringApplication</span>.<span class="pl-en">refresh</span>(<span class="pl-smi">SpringApplication</span>.<span class="pl-smi">java</span>:<span class="pl-c1">775</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">boot</span>.<span class="pl-s1">SpringApplication</span>.<span class="pl-en">refreshContext</span>(<span class="pl-smi">SpringApplication</span>.<span class="pl-smi">java</span>:<span class="pl-c1">397</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">boot</span>.<span class="pl-s1">SpringApplication</span>.<span class="pl-en">run</span>(<span class="pl-smi">SpringApplication</span>.<span class="pl-smi">java</span>:<span class="pl-c1">316</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">boot</span>.<span class="pl-s1">SpringApplication</span>.<span class="pl-en">run</span>(<span class="pl-smi">SpringApplication</span>.<span class="pl-smi">java</span>:<span class="pl-c1">1260</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">boot</span>.<span class="pl-s1">SpringApplication</span>.<span class="pl-en">run</span>(<span class="pl-smi">SpringApplication</span>.<span class="pl-smi">java</span>:<span class="pl-c1">1248</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">com</span>.<span class="pl-s1">jidian</span>.<span class="pl-s1">cosalon</span>.<span class="pl-s1">rest</span>.<span class="pl-s1">consumer</span>.<span class="pl-s1">RestConsumerBootifulKt</span>.<span class="pl-en">main</span>(<span class="pl-smi">RestConsumerBootiful</span>.<span class="pl-smi">kt</span>:<span class="pl-c1">14</span>)
<span class="pl-s1">Caused</span> <span class="pl-s1">by</span>: <span class="pl-s1">java</span>.<span class="pl-s1">lang</span>.<span class="pl-s1">IllegalStateException</span>: <span class="pl-s1">Invalid</span> <span class="pl-s1">name</span>="<span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">dubbo</span>.<span class="pl-s1">config</span>.<span class="pl-s1">ProtocolConfig</span>#<span class="pl-c1">0</span>" <span class="pl-s1">contains</span> <span class="pl-s1">illegal</span> <span class="pl-s1">character</span>, <span class="pl-s1">only</span> <span class="pl-s1">digit</span>, <span class="pl-s1">letter</span>, <span class="pl-s">'-'</span>, <span class="pl-s">'_'</span> <span class="pl-s1">or</span> <span class="pl-s">'.'</span> <span class="pl-s1">is</span> <span class="pl-s1">legal</span>.
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">dubbo</span>.<span class="pl-s1">config</span>.<span class="pl-s1">AbstractConfig</span>.<span class="pl-s1">checkProperty</span>(<span class="pl-s1">AbstractConfig</span>.<span class="pl-s1">java</span>:<span class="pl-c1">380</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">dubbo</span>.<span class="pl-s1">config</span>.<span class="pl-s1">AbstractConfig</span>.<span class="pl-s1">checkName</span>(<span class="pl-s1">AbstractConfig</span>.<span class="pl-s1">java</span>:<span class="pl-c1">338</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">dubbo</span>.<span class="pl-s1">config</span>.<span class="pl-s1">ProtocolConfig</span>.<span class="pl-s1">setName</span>(<span class="pl-s1">ProtocolConfig</span>.<span class="pl-s1">java</span>:<span class="pl-c1">221</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">sun</span>.<span class="pl-s1">reflect</span>.<span class="pl-s1">NativeMethodAccessorImpl</span>.<span class="pl-s1">invoke0</span>(<span class="pl-s1">Native</span> <span class="pl-s1">Method</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">sun</span>.<span class="pl-s1">reflect</span>.<span class="pl-s1">NativeMethodAccessorImpl</span>.<span class="pl-s1">invoke</span>(<span class="pl-s1">NativeMethodAccessorImpl</span>.<span class="pl-s1">java</span>:<span class="pl-c1">62</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">sun</span>.<span class="pl-s1">reflect</span>.<span class="pl-s1">DelegatingMethodAccessorImpl</span>.<span class="pl-s1">invoke</span>(<span class="pl-s1">DelegatingMethodAccessorImpl</span>.<span class="pl-s1">java</span>:<span class="pl-c1">43</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">java</span>.<span class="pl-s1">lang</span>.<span class="pl-s1">reflect</span>.<span class="pl-s1">Method</span>.<span class="pl-s1">invoke</span>(<span class="pl-s1">Method</span>.<span class="pl-s1">java</span>:<span class="pl-c1">498</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">util</span>.<span class="pl-s1">ReflectionUtils</span>.<span class="pl-s1">invokeMethod</span>(<span class="pl-s1">ReflectionUtils</span>.<span class="pl-s1">java</span>:<span class="pl-c1">246</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">dubbo</span>.<span class="pl-s1">config</span>.<span class="pl-s1">spring</span>.<span class="pl-s1">context</span>.<span class="pl-s1">config</span>.<span class="pl-s1">NamePropertyDefaultValueDubboConfigBeanCustomizer</span>.<span class="pl-s1">customize</span>(<span class="pl-s1">NamePropertyDefaultValueDubboConfigBeanCustomizer</span>.<span class="pl-s1">java</span>:<span class="pl-c1">73</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">dubbo</span>.<span class="pl-s1">config</span>.<span class="pl-s1">spring</span>.<span class="pl-s1">beans</span>.<span class="pl-s1">factory</span>.<span class="pl-s1">annotation</span>.<span class="pl-s1">DubboConfigBindingBeanPostProcessor</span>.<span class="pl-s1">customize</span>(<span class="pl-s1">DubboConfigBindingBeanPostProcessor</span>.<span class="pl-s1">java</span>:<span class="pl-c1">117</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">dubbo</span>.<span class="pl-s1">config</span>.<span class="pl-s1">spring</span>.<span class="pl-s1">beans</span>.<span class="pl-s1">factory</span>.<span class="pl-s1">annotation</span>.<span class="pl-s1">DubboConfigBindingBeanPostProcessor</span>.<span class="pl-en">postProcessBeforeInitialization</span>(<span class="pl-smi">DubboConfigBindingBeanPostProcessor</span>.<span class="pl-smi">java</span>:<span class="pl-c1">96</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">beans</span>.<span class="pl-s1">factory</span>.<span class="pl-s1">support</span>.<span class="pl-s1">AbstractAutowireCapableBeanFactory</span>.<span class="pl-en">applyBeanPostProcessorsBeforeInitialization</span>(<span class="pl-smi">AbstractAutowireCapableBeanFactory</span>.<span class="pl-smi">java</span>:<span class="pl-c1">414</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">beans</span>.<span class="pl-s1">factory</span>.<span class="pl-s1">support</span>.<span class="pl-s1">AbstractAutowireCapableBeanFactory</span>.<span class="pl-en">initializeBean</span>(<span class="pl-smi">AbstractAutowireCapableBeanFactory</span>.<span class="pl-smi">java</span>:<span class="pl-c1">1754</span>)
	<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">springframework</span>.<span class="pl-s1">beans</span>.<span class="pl-s1">factory</span>.<span class="pl-s1">support</span>.<span class="pl-s1">AbstractAutowireCapableBeanFactory</span>.<span class="pl-en">doCreateBean</span>(<span class="pl-smi">AbstractAutowireCapableBeanFactory</span>.<span class="pl-smi">java</span>:<span class="pl-c1">593</span>)
	... <span class="pl-c1">15</span> <span class="pl-s1">common</span> <span class="pl-smi">frames</span> <span class="pl-s1">omitted</span></pre></div>
<p dir="auto">This is not required to be configured in the 2.7.0 version.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 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"> 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.6.4</li>
<li>Operating System version: linux</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>可重现bug的最小环境：spirng boot 2.0.4  + quartz 2.3.0 + dubbo 2.6.4</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps？</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</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="系统启动时抛空指针异常，堆栈如下：
2019-08-08 10:26:40,310 [quartzScheduler_QuartzSchedulerThread] ERROR org.quartz.core.ErrorLogger:2401 schedulerError     - An error occured instantiating job to be executed. job= 'DEFAULT.DemoJob' org.quartz.SchedulerException: Job instantiation failed
	at org.springframework.scheduling.quartz.AdaptableJobFactory.newJob(AdaptableJobFactory.java:47) ~[spring-context-support-5.0.8.RELEASE.jar:5.0.8.RELEASE]
	at org.quartz.core.JobRunShell.initialize(JobRunShell.java:127) [quartz-2.3.0.jar:?]
	at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:392) [quartz-2.3.0.jar:?]
Caused by: java.lang.NullPointerException
	at com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor.postProcessBeforeInitialization(DubboConfigBindingBeanPostProcessor.java:78) ~[dubbo-2.6.2.jar:2.6.2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:416) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1691) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:407) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
	at org.springframework.boot.autoconfigure.quartz.AutowireCapableBeanJobFactory.createJobInstance(AutowireCapableBeanJobFactory.java:45) ~[spring-boot-autoconfigure-2.0.4.RELEASE.jar:2.0.4.RELEASE]
	at org.springframework.scheduling.quartz.AdaptableJobFactory.newJob(AdaptableJobFactory.java:43) ~[spring-context-support-5.0.8.RELEASE.jar:5.0.8.RELEASE]
	... 2 more
"><pre class="notranslate"><code class="notranslate">系统启动时抛空指针异常，堆栈如下：
2019-08-08 10:26:40,310 [quartzScheduler_QuartzSchedulerThread] ERROR org.quartz.core.ErrorLogger:2401 schedulerError     - An error occured instantiating job to be executed. job= 'DEFAULT.DemoJob' org.quartz.SchedulerException: Job instantiation failed
	at org.springframework.scheduling.quartz.AdaptableJobFactory.newJob(AdaptableJobFactory.java:47) ~[spring-context-support-5.0.8.RELEASE.jar:5.0.8.RELEASE]
	at org.quartz.core.JobRunShell.initialize(JobRunShell.java:127) [quartz-2.3.0.jar:?]
	at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:392) [quartz-2.3.0.jar:?]
Caused by: java.lang.NullPointerException
	at com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor.postProcessBeforeInitialization(DubboConfigBindingBeanPostProcessor.java:78) ~[dubbo-2.6.2.jar:2.6.2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:416) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1691) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:407) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
	at org.springframework.boot.autoconfigure.quartz.AutowireCapableBeanJobFactory.createJobInstance(AutowireCapableBeanJobFactory.java:45) ~[spring-boot-autoconfigure-2.0.4.RELEASE.jar:2.0.4.RELEASE]
	at org.springframework.scheduling.quartz.AdaptableJobFactory.newJob(AdaptableJobFactory.java:43) ~[spring-context-support-5.0.8.RELEASE.jar:5.0.8.RELEASE]
	... 2 more

</code></pre></div>
<h3 dir="auto">问题可能原因</h3>
<p dir="auto">引起此 bug可能的原因是，在集成 quartz 的过程中，spring boot 中的 quartz配置组件向spring context 注入了匿名bean，而且 dubbo组件(DubboConfigBindingBeanPostProcessor.java:78) 这个类中没考虑到 beanName可能为null，重然异致npe。<br>
quartz配置组件向spring context 注入了匿名bean的相关代码，在(org.springframework.boot.autoconfigure.quartz.AutowireCapableBeanJobFactory.java:45)，如下图：<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/43158596/62671146-38db3a80-b9c8-11e9-8cd2-4f5c2e61531c.jpg"><img src="https://user-images.githubusercontent.com/43158596/62671146-38db3a80-b9c8-11e9-8cd2-4f5c2e61531c.jpg" alt="dubbo1" style="max-width: 100%;"></a></p>
<p dir="auto">dubbo组件(DubboConfigBindingBeanPostProcessor.java:78) 空指针异常的代码如下图：<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/43158596/62671208-7dff6c80-b9c8-11e9-8c6b-11ff30b1d653.jpg"><img src="https://user-images.githubusercontent.com/43158596/62671208-7dff6c80-b9c8-11e9-8c6b-11ff30b1d653.jpg" alt="dubbo2" style="max-width: 100%;"></a></p>
<h3 dir="auto">bug修复建议：</h3>
<p dir="auto">建议在 DubboConfigBindingBeanPostProcessor 类的条件判断语句中先判断 beanName是否为null</p>