aspose file tools*
The moose likes Spring and the fly likes org.springframework.beans.NotReadablePropertyExcep tion: Invalid property Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "org.springframework.beans.NotReadablePropertyExcep tion: Invalid property" Watch "org.springframework.beans.NotReadablePropertyExcep tion: Invalid property" New topic
Author

org.springframework.beans.NotReadablePropertyExcep tion: Invalid property

Alexei Alexei
Greenhorn

Joined: Aug 17, 2009
Posts: 1
my controller


my jsp

<form:form method="POST" action="add.htm" commandName="commandName">
<%@ include file="/WEB-INF/jsp/headerDetails.jsp"%>
<table width="645" border="0">
<tr>
<th class="styleHeader" colspan="2" scope="col"><spring:message
code="profile" /></th>
<th width="10" scope="col"> </th>
<th class="styleHeader" width="349" scope="col"><spring:message
code="permissions" /></th>
</tr>
<tr>
<td><label><spring:message code="name" />*</label></td>
<td><form:input path="profile.name" size="32" maxlength="30" /> <br>
<form:errors path="name" cssClass="styleErrorMessage" /></td>
<td> </td>
<td><label> <input type="checkbox" name="checkbox"
id="checkbox" /> Control of 1</label></td>
</tr>
...

I get the next error:
org.apache.jasper.JasperException: An exception occurred processing JSP page /WEB-INF/jsp/profile.jsp at line 25

22: </tr>
23: <tr>
24: <td><label><spring:message code="name" />*</label></td>
25: <td><form:input path="profile.name" size="32" maxlength="30" /> <br>
26: <form:errors path="name" cssClass="styleErrorMessage" /></td>
27: <td> </td>
28: <td><label> <input type="checkbox" name="checkbox"


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handle JspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:416)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
org.springframework.web.servlet.view.InternalResou rceView.renderMergedOutputModel(InternalResourceVi ew.java:236)
org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:257)
org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1183)
org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:902)
org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:807)
org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:571)
org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:501)
javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
javax.servlet.http.HttpServlet.service(HttpServlet .java:717)


root cause
org.springframework.beans.NotReadablePropertyExcep tion: Invalid property 'profile' of bean class [java.util.HashMap]: Bean property 'profile' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
org.springframework.beans.BeanWrapperImpl.getPrope rtyValue(BeanWrapperImpl.java:540)
org.springframework.beans.BeanWrapperImpl.getNeste dBeanWrapper(BeanWrapperImpl.java:447)
org.springframework.beans.BeanWrapperImpl.getBeanW rapperForPropertyPath(BeanWrapperImpl.java:424)
org.springframework.beans.BeanWrapperImpl.getPrope rtyValue(BeanWrapperImpl.java:530)
org.springframework.web.servlet.support.BindStatus .<init>(BindStatus.java:147)
org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.getBindStatus(AbstractData BoundFormElementTag.java:172)
org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.getPropertyPath(AbstractDa taBoundFormElementTag.java:192)
org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.getName(AbstractDataBoundF ormElementTag.java:158)
org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.autogenerateId(AbstractDat aBoundFormElementTag.java:145)
org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.resolveId(AbstractDataBoun dFormElementTag.java:136)
org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.writeDefaultAttributes(Abs tractDataBoundFormElementTag.java:120)
org.springframework.web.servlet.tags.form.Abstract HtmlElementTag.writeDefaultAttributes(AbstractHtml ElementTag.java:379)
org.springframework.web.servlet.tags.form.InputTag .writeTagContent(InputTag.java:139)
org.springframework.web.servlet.tags.form.Abstract FormTag.doStartTagInternal(AbstractFormTag.java:90 )
org.springframework.web.servlet.tags.RequestContex tAwareTag.doStartTag(RequestContextAwareTag.java:7 7)
org.apache.jsp.WEB_002dINF.jsp.profile_jsp._jspx_m eth_form_005finput_005f0(profile_jsp.java:547)
org.apache.jsp.WEB_002dINF.jsp.profile_jsp._jspSer vice(profile_jsp.java:173)
org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
org.springframework.web.servlet.view.InternalResou rceView.renderMergedOutputModel(InternalResourceVi ew.java:236)
org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:257)
org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1183)
org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:902)
org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:807)
org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:571)
org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:501)
javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
stanislav bashkirtsev
Ranch Hand

Joined: Aug 17, 2009
Posts: 75
Show your commandClass, does it have a property "profile"?
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
Read error message and try to understand what it does mean. It's very obvious.


SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: org.springframework.beans.NotReadablePropertyExcep tion: Invalid property