Home  >  Forum  >  Spring
Post New Query

Bean property is not writable or has an invalid setter method.



Asked on April 11, 2013
Hi All,

Stuck with the error. Any suggestion.

Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'name' of bean class: Bean property 'name' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1064)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:924)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:76)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
... 13 more

Thanks



Replied on April 11, 2013
It seems that you injecting dependencies of a class. But may be you are doing mistake that 'name' is not the variable of that class.  Check the class  that there is setter method or any private variable and is the part of constructor argument?


Write Answer








©2019 concretepage.com | Privacy Policy | Contact Us