Either BindingResult nor plain target object for bean name 'u' available as request attribute | Spring Boot, Hibernate, MicroServices and Cloud Forum
R
RamPrakash Kothandaramulu Posted on 21/09/2021

ava.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'u' available as request attribute
at org.springframework.web.servlet.support.BindStatus.<init>(BindStatus.java:153) ~[spring-webmvc-5.3.9.jar:5.3.9]
at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getBindStatus(AbstractDataBoundFormElementTag.java:178) ~[spring-webmvc-5.3.9.jar:5.3.9]
at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getPropertyPath(AbstractDataBoundFormElementTag.java:199) ~[spring-webmvc-5.3.9.jar:5.3.9]
at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getName(AbstractDataBoundFormElementTag.java:164) ~[spring-webmvc-5.3.9.jar:5.3.9]
at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.autogenerateId(AbstractDataBoundFormElementTag.java:149) ~[spring-webmvc-5.3.9.jar:5.3.9]
at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.resolveId(AbstractDataBoundFormElementTag.java:139) ~[spring-webmvc-5.3.9.jar:5.3.9]
at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.writeDefaultAttributes(AbstractDataBoundFormElementTag.java:122) ~[spring-webmvc-5.3.9.jar:5.3.9]
at org.springframework.web.servlet.tags.form.AbstractHtmlElementTag.writeDefaultAttributes(AbstractHtmlElementTag.java:460) ~[spring-webmvc-5.3.9.jar:5.3.9]
at org.springframework.web.servlet.tags.form.InputTag.writeTagContent(InputTag.java:357) ~[spring-webmvc-5.3.9.jar:5.3.9]
at org.springframework.web.servlet.tags.form.AbstractFormTag.doStartTagInternal(AbstractFormTag.java:87) ~[spring-webmvc-5.3.9.jar:5.3.9]
at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:83) ~[spring-webmvc-5.3.9.jar:5.3.9]
at org.apache.jsp.WEB_002dINF.jsp.login_jsp._jspx_meth_form_005finput_005f0(login_jsp.java:297) ~[na:na]
at org.apache.jsp.WEB_002dINF.jsp.login_jsp._jspx_meth_form_005fform_005f0(login_jsp.java:249) ~[na:na]
at org.apache.jsp.WEB_002dINF.jsp.login_jsp._jspService(login_jsp.java:170) ~[na:na]
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) ~[tomcat-embed-jasper-9.0.52.jar:9.0.52]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[tomcat-embed-core-9.0.52.jar:4.0.FR]
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466) ~[tomcat-embed-jasper-


Y
Yogesh Chawla Replied on 22/09/2021

Ram, There seems to be certain discrepency between register.jsp, Registration Controller and User bean. Somewhere you must have mentioned a different field name that does not match with what is being mentioned in register.jsp.

I need to look at your files to figure out where this discrepency is. You can mail me those files as well or we will see in a session.