This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

Bean property 'xx' is not writable or has an invalid setter?Page Title Module

Bean property 'xx' is not writable or has an invalid setter?

Jun 8th, 2005, 04:24 PM

Hi,

can somebody tell me what this means. I'm trying to figure out where to look for the mistake (applicationContext.xml?, model-class?, mapping-file?, ???).

The error:
org.springframework.beans.NotWritablePropertyExept ion: Invalid property 'myBean' of bean class .... :
Bean property 'myBean' is not writable or has an invalid setter method: Does the parametertype of the setter match the return type of the getter?

org.springframework.beans.factory.BeanCreationException&#58; Error creating bean with name 'petStoreServiceTarget' defined in class path resource &#91;de/fhkempten/webedi/cocoon/portal/spring/applicationContext.xml&#93;&#58; Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException&#58; Invalid property 'sairportDAO' of bean class &#91;de.fhkempten.webedi.cocoon.portal.spring.service.PetStoreServiceImpl&#93;&#58; Bean property 'sairportDAO' is not writable or has an invalid setter method&#58; Does the parameter type of the setter match the return type of the getter?
org.springframework.beans.NotWritablePropertyException&#58; Invalid property 'sairportDAO' of bean class &#91;de.fhkempten.webedi.cocoon.portal.spring.service.PetStoreServiceImpl&#93;&#58; Bean property 'sairportDAO' is not writable or has an invalid setter method&#58; Does the parameter type of the setter match the re

Or did I understand you guys wrong, that the error was probably in the POJO?

Comment

I have a similar issue but it doesn't have anything to do with any of my class. I upgraded from 2.5 to 2.5.6 and I get this error on an application that used to work just fine.

Any thoughts?

Code:

SEVERE: StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'org.springframework.context.annotation.internalPersistenceAnnotationProcessor':
Error setting property values; nested exception is
org.springframework.beans.NotWritablePropertyException: Invalid property
'order' of bean class
[org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor]:
Bean property 'order' 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.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1279)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)