InMemory & Hibernate

174 views
Skip to first unread message

H2Fan

unread,
Apr 18, 2009, 12:42:08 PM4/18/09
to H2 Database
Hi,

when using H2 with Hibernate in Memory-Mode (jdbc:h2:mem:) and
'hibernate.hbm2ddl.auto' set to 'create' I do get

Caused by: org.h2.jdbc.JdbcSQLException: Table TABLE123 not found

When I change the jdbc-url to "jdbc:h2:file:newdb" (which doesn't
exist) everything works fine, i.e. Hibernate creates the tables and
sqls are executed.

Seems like a bug in the memory-implementation of H2 for me.

Thanks for help,
H2Fan

Thomas Mueller

unread,
Apr 19, 2009, 7:47:28 AM4/19/09
to h2-da...@googlegroups.com
Hi,

In the in-memory mode data is not persisted. If the process
terminates, all data is lost. Probably you are using multiple
processes. See also
http://www.h2database.com/html/features.html#memory_only_databases

Regards,
Thomas

Reply all
Reply to author
Forward
0 new messages