title: SQLite database connection problems java/eclipse
body: <pre><code>import java.sql.Connection;
  import java.sql.DriverManager;
  import java.sql.ResultSet;
  import java.sql.SQLException;
  import java.sql.Statement;
  
  
  public class GestorBase
  {
  private  ResultSet resultset;
  private static  Connection con;
  private  Statement sentencia;
  
  public static void main(String[] args) throws SQLException, ClassNotFoundException
      {
  
      Class.forName("org.sqlite.JDBC");
  
      con = DriverManager.getConnection("jdbc:sqlite:db/Freepark.sqlite");
  
      System.out.println("error al buscar la base de datos");
  
      Statement sentencia = con.createStatement();
  
      String query = "SELECT * FROM Restaurantes";
  
      ResultSet resultset = sentencia.executeQuery(query);
  
  
      while(resultset.next())
          {
              String nombre = resultset.getString("NOMBRE");
              String calle = resultset.getString("CALLE");
              int codigo = resultset.getInt("CODIGO");
              System.out.println("Codigo de restaurante: "+ codigo +" Nombre de restaurante: "+ nombre +" Calle del restaurante: "+ calle);
          }
  
  
  
      }
  }
  </code></pre>
  
  <p>I am trying to connect to a sqlite database in Java but I get this console log:</p>
  
  <pre><code>Exception in thread "main" java.sql.SQLException: out of memory
  at org.sqlite.DB.throwex(DB.java:288)
  at org.sqlite.NestedDB._open(NestedDB.java:73)
  at org.sqlite.DB.open(DB.java:77)
  at org.sqlite.Conn.&lt;init&gt;(Conn.java:88)
  at org.sqlite.JDBC.connect(JDBC.java:64)
  at java.sql.DriverManager.getConnection(Unknown Source)
  at java.sql.DriverManager.getConnection(Unknown Source)
  at GestorBase.main(GestorBase.java:21)
  </code></pre>