org.springframework.beans.NotWritablePropertyException: Invalid property '' of bean class?2009-02-13 15:22
出现异常的原因是在application-xxx.xml中property name的错误。
<property name="...."> 中name的名字是与bean的set方法相关的,而且要注意大小写。
比如
public class PostManageImpl extends BaseManage implements PostManage {
private PostDAO dao = null;
public void setPostDAO(PostDAO postDAO){
this.dao = postDAO;
}
}
那么xml的定义应该是:
<bean id="postManage" parent="txProxyTemplate">
<property name="target">
<bean class="com.yz.spring.service.implement.PostManageImpl">
<property name="postDAO"><ref bean="postDAO"/></property> 对
<property name="dao"><ref bean="postDAO"/></property> 错
</bean>
</property>
</bean>
分享到:
相关推荐
nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'error_view' of bean class [com.demo.controller.action.AuthorAction]: Bean property 'error_view' is not ...
nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'transactionManagerBeanName' of bean class [org.springframework.transaction.interceptor....
大家可以直接使用 Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property ...
Dubbo管理控制台(兼容JDK8)
org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType' is not writable ...
如果是在JDK8下跑,会报错: org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean ...
org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType' is not writable or...
org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType' is not writable ...