- [x] I have searched the 
[issues](https://github.com/apache/incubator-dubbo/issues) of this repository 
and believe that this is not a duplicate.
- [x] 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 version: 2.7.0-SNAPSHOT
* Operating System version: mac pro
* Java version: 1.8

### Step to reproduce this issue

1. Assume that the configuration file contains the following configuration:
``` xml
<dubbo:reference id="demoService" check="false" 
interface="org.apache.dubbo.http2.DemoService" protocol-config="http2"/>
```

2. Starting the application will give an error:
```
Exception in thread "main" 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'demoService': Error setting property values; nested exception is 
org.springframework.beans.NotWritablePropertyException: Invalid property 
'protocol-config' of bean class [org.apache.dubbo.config.spring.ReferenceBean]: 
Bean property 'protocol-config' is not writable or has an invalid setter 
method. Did you mean 'protocolConfig'?
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1570)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1280)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:742)
        at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
        at 
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
        at 
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
        at org.apache.dubbo.http2.consumer.Consumer.main(Consumer.java:29)
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid 
property 'protocol-config' of bean class 
[org.apache.dubbo.config.spring.ReferenceBean]: Bean property 'protocol-config' 
is not writable or has an invalid setter method. Did you mean 'protocolConfig'?
        at 
org.springframework.beans.BeanWrapperImpl.createNotWritablePropertyException(BeanWrapperImpl.java:239)
        at 
org.springframework.beans.AbstractNestablePropertyAccessor.processLocalProperty(AbstractNestablePropertyAccessor.java:435)
        at 
org.springframework.beans.AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.java:290)
        at 
org.springframework.beans.AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.java:278)
        at 
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:95)
        at 
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1566)
```


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

Reply via email to