2 Replies Latest reply on Mar 30, 2005 9:20 AM by shanker

    Table not  found sql exception while executing servlet in jb

    shanker Newbie

      In public void init(ServletConfig config)

      Class.forName("org.hsqldb.jdbcDriver");
      System.out.println("driver loaded");
      connection = DriverManager.getConnection("jdbc:hsqldb:Employee","sa","");

      in doPost I am calling insertInToDb in which i have this code

      statement = connection.createStatement();
      System.out.println("created statement");
      statement.executeUpdate("INSERT INTO Employee values(" + values + ");");
      statement.close();

      I have created the table using create table statement in hypersonic.

      I am geting following errors. Please help thanks in advance.

      20:12:28,328 ERROR [STDERR] Insert failed
      20:12:28,328 ERROR [STDERR] java.sql.SQLException: Table not found: EMPLOYEE in
      statement [INSERT INTO Employee values('aaaa',12,Fri Dec 12 00:00:00 GMT+05:30 1
      980,Sun Dec 12 00:00:00 GMT+05:30 2004,'true','false','true');]
      20:12:28,328 ERROR [STDERR] at org.hsqldb.Trace.getError(Unknown Source)
      20:12:28,328 ERROR [STDERR] at org.hsqldb.jdbcResultSet.(Unknown Sourc
      e)
      20:12:28,328 ERROR [STDERR] at org.hsqldb.jdbcConnection.executeStandalone(U
      nknown Source)
      20:12:28,328 ERROR [STDERR] at org.hsqldb.jdbcConnection.execute(Unknown Sou
      rce)
      20:12:28,328 ERROR [STDERR] at org.hsqldb.jdbcStatement.fetchResult(Unknown
      Source)
      20:12:28,328 ERROR [STDERR] at org.hsqldb.jdbcStatement.executeUpdate(Unknow
      n Source)
      20:12:28,328 ERROR [STDERR] at EmployeeServlet.insertIntoDB(EmployeeServlet.
      java:112)
      20:12:28,328 ERROR [STDERR] at EmployeeServlet.doPost(EmployeeServlet.java:9
      3)


      Please help thanks in advance.