Invalid bean property or is not readable to loading Jsp page


sometime we have face issue related to that bean property is not readable in Spring MVC or you may also call bean  has invalid getter method. so our problem looks like below mentioned.This is an error which displays on your framework console.

Problem-

org.springframework.beans.NotReadablePropertyException: Invalid property 
'loginId11111' of bean class

[*.model.LoginForm]: Bean property 'loginId11111' is not readable or has 
an invalid getter method: Does the return type of the getter match the 
parameter type of the setter?
at org.springframework.beans.AbstractNestablePropertyAccessor.
getPropertyValue(AbstractNestablePropertyAccessor.java:619)
at org.springframework.beans.AbstractNestablePropertyAccessor.
getPropertyValue(AbstractNestablePropertyAccessor.java:610)
at org.springframework.validation.AbstractPropertyBindingResult.
getActualFieldValue(AbstractPropertyBindingResult.java:99)
at org.springframework.validation.AbstractBindingResult.
getFieldValue(AbstractBindingResult.java:229)
at org.springframework.web.servlet.support.BindStatus
.(BindStatus.java:120)
at org.springframework.web.servlet.tags.form
.AbstractDataBoundFormElementTag.
getBindStatus(AbstractDataBoundFormElementTag.java:168)
at org.springframework.web.servlet.tags.form
.AbstractDataBoundFormElementTag.
getPropertyPath(AbstractDataBoundFormElementTag.java:188)
at org.springframework.web.servlet.tags.form
.AbstractDataBoundFormElementTag.
getName(AbstractDataBoundFormElementTag.java:154)

at org.springframework.web.servlet.tags.form
.AbstractDataBoundFormElementTag.
writeDefaultAttributes(AbstractDataBoundFormElementTag.java:117)

at org.springframework.web.servlet.tags.form.AbstractHtmlElementTag.
writeDefaultAttributes(AbstractHtmlElementTag.java:422)
at org.springframework.web.servlet.tags.form.InputTag.writeTagContent
(InputTag.java:142)

at org.springframework.web.servlet.tags.form.AbstractFormTag.
doStartTagInternal(AbstractFormTag.java:84)

at org.springframework.web.servlet.tags.RequestContextAwareTag.
doStartTag(RequestContextAwareTag.java:80)

at org.apache.jsp.WEB_002dINF.jsp.login.
login_jsp._jspx_meth_form_005finput_005f0(login_jsp.java:976)

at org.apache.jsp.WEB_002dINF.jsp.login.login_jsp._jspService
(login_jsp.java:312)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

at org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:438)

at org.apache.jasper.servlet.JspServlet.
serviceJspFile(JspServlet.java:396)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)

Solution-

when we get this type of exception the we check the object of Model Attribute that particular variable(Getter and Setter) are defined the Attribute Class.

solution with example:

 loginId11111  variable are not in the Login Class

public class Login{

String loginId11111;


public String getLoginId11111() {
return loginId11111;
}
public void setLoginId11111(String loginId11111) {
this.loginId11111= loginId11111;
}

}
Hope you like this article, please ask any doubt  if you have related to this article.

Comments

Popular posts from this blog

datatable with both top and bottom scroll bar.

Display Loader and disable page while waiting for ajax request