troubleshooting Question

javax.el.PropertyNotFoundException: Property

Avatar of ashok Priyadarshan
ashok Priyadarshan asked on
JSP* Spring Framework
7 Comments1 Solution2234 ViewsLast Modified:
I added a new value to my  home.jsp - jobtitle.
I added a new private string to my class containing jobtitle with setters and getters
I added the jobtitle to my impl: aContact.setJobTitle(rs.getString("jobtitle"));

the home.jsp is returning a 500 error.

HTTP Status 500 – Internal Server Error
Type Exception Report

Message An exception occurred processing JSP page [/WEB-INF/views/home.jsp] at line [28]

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.apache.jasper.JasperException: An exception occurred processing JSP page [/WEB-INF/views/home.jsp] at line [28]

25:                     <tr>
26:                           <td>${status.index + 1}</td>
27:                               <td>${contact.name}</td>
28:                               <td>${contact.jobtitle}</td>
29:                               <td>${contact.email}</td>
30:                               <td>${contact.address}</td>
31:                               <td>${contact.telephone}</td>


Stacktrace:
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:584)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:481)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:209)
      org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:267)
      org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1217)
      org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1005)
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:952)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
      org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
      org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
Root Cause

javax.el.PropertyNotFoundException: Property [jobtitle] not found on type [net.codejava.spring.model.Contact]
      javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:260)
      javax.el.BeanELResolver$BeanProperties.access$300(BeanELResolver.java:212)
      javax.el.BeanELResolver.property(BeanELResolver.java:347)
      javax.el.BeanELResolver.getValue(BeanELResolver.java:92)
      org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:110)
      org.apache.el.parser.AstValue.getValue(AstValue.java:169)
      org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190)
      org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:944)
      org.apache.jsp.WEB_002dINF.views.home_jsp._jspx_meth_c_005fforEach_005f0(home_jsp.java:202)
      org.apache.jsp.WEB_002dINF.views.home_jsp._jspService(home_jsp.java:143)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:209)
      org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:267)
      org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1217)
      org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1005)
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:952)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
      org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
      org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
Note The full stack trace of the root cause is available in the server logs.
Apache Tomcat/8.5.31


I haave enclosed the server log and he source code.

I need a quick fix
ASKER CERTIFIED SOLUTION
rrz
student

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros