You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "zhangfei9734 (GitHub)" <gi...@apache.org> on 2019/03/27 16:25:24 UTC

[GitHub] [incubator-dubbo] zhangfei9734 opened issue #3759: Did you cancel the default dubbo protocol settings in dubbo-2.7.1?

- [ ] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.

### Environment

 :: Dubbo Spring Boot (v2.7.0) : https://github.com/apache/incubator-dubbo-spring-boot-project
 :: Dubbo (vdubbo-2.7.1.RELEASE) : https://github.com/apache/incubator-dubbo
 :: Discuss group : dev@dubbo.apache.org

### Steps to reproduce this issue

application.yaml
```yaml
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
```
If I comment out the name configuration in the protocol, the following exception will occur.
```java
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="org.apache.dubbo.config.ProtocolConfig#0" 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="org.apache.dubbo.config.ProtocolConfig#0" 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="org.apache.dubbo.config.ProtocolConfig#0" 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
```
This is not required to be configured in the 2.7.0 version.

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3759 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org