Hi,

Most likely the table was not created, or it was created in a different
database (a different path).

What is your database URL? I suggest to use an absolute path, for example
jdbc:h2:/data/db/test. Using a relative path such as jdbc:h2:test is a
common reason for such problems.

Regards,
Thomas



On Wednesday, June 27, 2012, r_jeff_m wrote:

> On Android
>
> I was using H2 version 1.3.151 without any problems. I upgraded to 1.3.167
> and all was fine too, until I recreated the database.
>
> I recreated the database and reloaded it, now I get this error on Android
> (but not on Windows/Java 1.5).
>
> 06-27 13:56:07.532: E/LibraryDB(276): org.h2.jdbc.JdbcSQLException: Table
> "ARTICLE" not found; SQL statement:
>
> Under Java 1.5 and Windows, the same code works fine.
>
> Any Ideas?
>
> **************
>
>     void Open(String filename) throws SQLException {
>     try {
>         Class.forName("org.h2.Driver");
>     } catch (ClassNotFoundException ex) {
>         Logger.getLogger(LibraryDB.class.getName()).log(Level.SEVERE,
> null, ex);
>     }
>     this.sFileName = filename;
>
>     String url = "jdbc:h2:" + sFileName + ";IFEXISTS=TRUE"; // only open
> it if it's already there
>     conn = DriverManager.getConnection(url, "sa", "");
>
>
>     }
>
>
>
>     Article getArticle(UUID articleUUID) {
>     try {
>         Statement stmt = conn.createStatement();
>         String myStmt = String.format("SELECT * FROM public.article WHERE
> uuid='%s'", articleUUID.toString());
>         ResultSet rs = stmt.executeQuery(myStmt);
>         if (rs.first()) {
>         Article myHint = new Article(rs);
>         stmt.close();
>         return myHint;
>         }
>     } catch (SQLException ex) {
>         Logger.getLogger(LibraryDB.class.getName()).log(Level.SEVERE,
> null, ex);
>     }
>     return null;
>     }
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/h2-database/-/xxeoZ2xKE0oJ.
> To post to this group, send email to 
> [email protected]<javascript:_e({}, 'cvml', 
> '[email protected]');>
> .
> To unsubscribe from this group, send email to
> [email protected] <javascript:_e({}, 'cvml',
> 'h2-database%[email protected]');>.
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to