The errors I'm getting indicate that the tables don't exist. "Table "itinerary" not found; SQL statement: DELETE FROM "itinerary" [42102-164] org.h2.jdbc.JdbcSQLException: Table "itinerary" not found; SQL statement: DELETE FROM "itinerary" [42102-164] at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) at org.h2.message.DbException.get(DbException.java:169) at org.h2.message.DbException.get(DbException.java:146) at org.h2.command.Parser.readTableOrView(Parser.java:4753) at org.h2.command.Parser.readTableOrView(Parser.java:4731) at org.h2.command.Parser.readSimpleTableFilter(Parser.java:709) at org.h2.command.Parser.parseDelete(Parser.java:731) at org.h2.command.Parser.parsePrepared(Parser.java:336) at org.h2.command.Parser.parse(Parser.java:279) at org.h2.command.Parser.parse(Parser.java:251) at org.h2.command.Parser.prepareCommand(Parser.java:217) at org.h2.engine.Session.prepareLocal(Session.java:415) at org.h2.engine.Session.prepareCommand(Session.java:364) at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1121) at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:71) at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:267) at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:213) ... 4 stack levels elided ... at korma.db$exec_sql.invoke(db.clj:206) at korma.db$do_query$fn__2578.invoke(db.clj:227) ... 1 stack levels elided ... at korma.db$do_query.invoke(db.clj:226) at korma.core$exec.invoke(core.clj:474)"
I've verified that using postgres instead of h2 works and that the migrations actually occur in the h2 in-memory database, but for some reason korma doesn't see the tables. I suspect that korma is actually connecting to a different database, or is connecting after the original in-memory database has closed (I used the "DB_CLOSE_DELAY=-1" argument to try and mitigate this). Do you have any tips for examining the in-memory database manually in h2 or verifying that the databases I'm connecting to are the same? On Monday, January 13, 2014 4:35:30 PM UTC-6, Christopher Allen wrote: > > Try it without H2 and check the contents of the database manually. "Korma > cooperating" doesn't mean a lot if the tables don't actually exist. > > Error messages should be provided in future. > > On Monday, January 13, 2014 1:44:28 PM UTC-8, Arlandis Lawrence wrote: >> >> I'm trying to use H2's in-memory database feature for running specs, so >> I'm using Ragtime to run migrations before the test. >> Problem is, I can't get Korma to cooperate. Could someone take a look at >> this gist and see if it makes sense? >> >> https://gist.github.com/arlandism/8408370 >> > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.