title: java.sql.SQLSyntaxErrorException: at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450) at oracle.jdbc.dr
body: <p>I have just start learning the jdbc with servlet and I have a table in oracle database that contain the result of students. I want to fetch the detail while searching through the roll no. my code is here</p>
  
  <p><a href="https://i.stack.imgur.com/8MeXS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8MeXS.png" alt="enter image description here"></a></p>
  
  <p>index.html</p>
  
  <pre><code>&lt;form action="ResultServlet"&gt;
      Enter your Rollno:&lt;input type="text" name="roll" /&gt;&lt;br /&gt; &lt;input
          type="submit" value="search" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>ResultServlet.java</p>
  
  <pre><code>  package atulrai;
  
  import java.io.IOException;
  import java.io.PrintWriter;
  import java.sql.Connection;
  import java.sql.DriverManager;
  import java.sql.PreparedStatement;
   import java.sql.ResultSet;
  import java.sql.ResultSetMetaData;
  
   import javax.servlet.ServletException;
    import javax.servlet.annotation.WebServlet;
    import javax.servlet.http.HttpServlet;
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
  
    /**
     * Servlet implementation class ResultServlet
     */
   @WebServlet("/ResultServlet")
   public class ResultServlet extends HttpServlet {
   private static final long serialVersionUID = 1L;
  
  /**
   * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
   *      response)
   */
  protected void doGet(HttpServletRequest request,
          HttpServletResponse response) throws ServletException, IOException {
      // TODO Auto-generated method stub
  
      response.setContentType("text/html");
      PrintWriter out = response.getWriter();
  
      String rollno = request.getParameter("roll");
      int roll = Integer.valueOf(rollno);
  
      try {
          Class.forName("oracle.jdbc.driver.OracleDriver");
          Connection con = DriverManager.getConnection(
                  "jdbc:oracle:thin:@localhost:1521:oracle12c", "AtulRai",
                  "atulrai");
  
          PreparedStatement ps = con
                  .prepareStatement("select * from result where rollno=?");
          ps.setInt(1, roll);
  
          out.print("&lt;table width=50% border=1&gt;");
          out.print("&lt;caption&gt;Result:&lt;/caption&gt;");
  
          ResultSet rs = ps.executeQuery();
  
          /* Printing column names */
          ResultSetMetaData rsmd = rs.getMetaData();
          int total = rsmd.getColumnCount();
          out.print("&lt;tr&gt;");
          for (int i = 1; i &lt;= total; i++) {
              out.print("&lt;th&gt;" + rsmd.getColumnName(i) + "&lt;/th&gt;");
          }
  
          out.print("&lt;/tr&gt;");
  
          /* Printing result */
  
          while (rs.next()) {
              out.print("&lt;tr&gt;&lt;td&gt;" + rs.getInt(1) + "&lt;/td&gt;&lt;td&gt;"
                      + rs.getString(2) + "&lt;/td&gt;&lt;td&gt;" + rs.getString(3)
                      + "&lt;/td&gt;&lt;td&gt;" + rs.getString(4) + "&lt;/td&gt;&lt;/tr&gt;");
  
          }
  
          out.print("&lt;/table&gt;");
  
      } catch (Exception e2) {
          e2.printStackTrace();
      }
  
      finally {
          out.close();
      }
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>when I have entered the roll no in html form it throw some exception which is not understandable for me. Any help please</p>
  
  <p>error here </p>
  
  <pre><code> java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
  
  at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
  at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
  at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059)
  at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522)
  at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)
  at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587)
  at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:225)
  at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:53)
  at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:774)
  at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:925)
  at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1111)
  at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4798)
  at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:4845)
  at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1501)
  at atulrai.ResultServlet.doGet(ResultServlet.java:51)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  at java.lang.Thread.run(Unknown Source)
  </code></pre>