-3

I'm getting the following error while running locRecords.jsp

An exception occurred processing JSP page /locRecords.jsp at line 268

<td><%=rs.getString("LOC_ID")%></td>
<td><%=rs.getString("LOC_NAME")%></td>
<td><%=rs.getString("LOC_CONTACT")%></td>
<td><%=rs.getString("LOC_ADDRESS")%></td>
<%if (rs.getString("BELONGED_TO") != null){%>
      <td><%=rs.getString("BELONGED_TO")%></td>

javax.servlet.ServletException: java.sql.SQLException: Invalid column name org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:911) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:840) org.apache.jsp.locRecords_jsp._jspService(locRecords_jsp.java:432) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
SOKA
  • 1
  • 3
  • It's a SQLException. It says "Invalid column name". So any of the strings passed to rs.getString() is not a valid column name in your database. – Holger May 30 '16 at 14:05

1 Answers1

0

I think you use a column name that is not the same as the relation(table) you used in your database.Please check your column names and your parameters for rs.getString().

kth
  • 1
  • 1