title: Java: Missing Database error
body: <p>I am getting the following error:</p>
  
  <pre><code>java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (no such table: apartments)
  </code></pre>
  
  <p>In reality, the table does exist. The following is my code:</p>
  
  <pre><code>try {
      // load the sqlite-JDBC driver using the current class loader
      Class.forName("org.sqlite.JDBC");
      Connection connection = null;
      // create a database connection
      connection = DriverManager.getConnection("jdbc:sqlite:/Path/To/apartments.db");
      System.out.println(connection.getMetaData());
      Statement statement = connection.createStatement();
      statement.setQueryTimeout(30);
  
      ResultSet rs = statement.executeQuery("select * from apartments");
      while(rs.next()) {
          // read the result set
          System.out.println("TEXT = " + rs.getString("display_text"));
          System.out.println("X1 = " + rs.getInt("x1"));
      }
  } catch (Exception ex) {
      Logger.getLogger(MouseEventDemo.class.getName()).log(Level.SEVERE, null, ex);
  }
  </code></pre>