Clicky

Spring - Bean property 'propertyXXX' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

October 30, 2014

Problem:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'beanXXX' defined in class path resource \[pathXXX/filenameXXX\]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'propertyXXX' of bean class \[packageXXX.classXXX\]: Bean property 'propertyXXX' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?  

Solution

Add the setter and getter methods for the invalid property.