Questions tagged [h2]

H2 is a relational database management system written in Java. It can be embedded in Java applications or run in the client-server mode. H2 supports regular disk-based as well as in-memory databases.

The software is available as open source software under modified versions of the Mozilla Public License or the original Eclipse Public License. The main features of H2 are:

  • Very fast, open source, JDBC API
  • Embedded and server modes; in-memory databases
  • Browser based Console application
  • Small footprint: around 2 MB jar file size

The main author of H2 is Thomas Mueller, who also developed the Java database engine Hypersonic SQL. The name H2 stands for Hypersonic 2, however H2 does not share code with Hypersonic SQL or HSQLDB.

Wiki

Issues

API

4948 questions
2
votes
1 answer

Reading from xml file and populating H2 DB table through Apache ServiceMix 4.2.2

I am trying to integrate a simple Enterprise App to a data source(xml file for now) using Apache Service Mix(ASM) ESB. Basically I need to have the ESB pick up content from the xml file and populate corresponding tables in a H2 database(which my app…
2
votes
1 answer

H2 in-memory database query is very slow

I am using H2 database to increase performance and therefore I decided to load data from MySQL to H2 database at run-time. The scenario is that I created three tables as book, author, book_author. book_author is a many-to-many table. The table…
dharshan
  • 733
  • 4
  • 11
  • 24
2
votes
1 answer

H2 database password recovery

We have thousands of users using H2 database, and sometimes, somehow, someone forgets the password. Is there a way of recovering, at least, the SA user password? Of course, i tell them that no one would be happy that this would be possible if the…
marcolopes
  • 9,232
  • 14
  • 54
  • 65
2
votes
1 answer

db2 hibernate hbm2ddl table not found error

I'm having the following problem while trying to execute unit tests. I'm working with a database in memory (I have used h2 and hsqldb for this purpose, but both of them drive me to the same error). Having the following hibernate.cfg.xml…
Alex_ES
  • 205
  • 2
  • 15
2
votes
1 answer

Squeryl 0.9.5 (with Lift 2.4) not releasing database connections/pools

Following the recommended transaction setup for Squeryl, in my Boot.scala: import net.liftweb.squerylrecord.SquerylRecord import org.squeryl.Session import org.squeryl.adapters.H2Adapter SquerylRecord.initWithSquerylSession(Session.create( …
Grant
  • 221
  • 2
  • 7
2
votes
1 answer

Unable to create an encrypted H2 database for Grails

I have a grails project where I need to create an encrypted H2 database, but I'm not sure how to make it work. Here is what I have in DataSource.groovy: dataSource { pooled = true driverClassName = "org.h2.Driver" dialect =…
wholladay
  • 1,400
  • 1
  • 18
  • 34
2
votes
1 answer

H2DB and Java, an approximate> two hour discrepancy

I am developing a race timing system, and for several instances, I need to retrieve a time object from H2DB. Like its bretheren (or sisteren), the time data type is relative to 1st January 1970 and is expressed in SQL in the 'hh:mm:ss' format, with…
RabtFt
  • 153
  • 15
2
votes
2 answers

Hibernate not saving data in H2 of JBoss 7.1.1

I'm currently working on JBoss 7.1.1 with JPA (with Hibernate) and Spring. I have spring's @Transactional to take care of Transactions. I'm currently using the internal H2 database of JBoss 7.1.1. All the transactions work fine when the server is…
Chris
  • 5,584
  • 9
  • 40
  • 58
2
votes
1 answer

play framework 2: h2 in memory database mysql compatibility mode: escaping characters

I'm working in development mode with an H2 in memory database, but I'd like it to behave as much as possible like a mysql database (see http://www.h2database.com/html/features.html#compatibility) this is my configuration in application.conf…
opensas
  • 60,462
  • 79
  • 252
  • 386
2
votes
1 answer

In-memory H2 database, insert scripts not persisting

I'm tying to use H2 as an in-memory database for my unit testing. I'm wiring everything together through Spring. Everything seems to work fine. The DB loads up, the ddl sql file runs, as does the dml sql (or so it seems). I can run a test that…
user1655798
  • 53
  • 2
  • 9
2
votes
2 answers

Play framework 2.0 Error when attempting to cascade delete "Parameter "#1" is not set; SQL statement: delete "

the full error line from my example is "[PersistenceException: org.h2.jdbc.JdbcSQLException: Parameter "#1" is not set; SQL statement: delete from class4 where (class3_id) in (?) [90012-158]]" this was occurring in my unit tests, so decided to…
Stowelly
  • 1,260
  • 2
  • 12
  • 31
2
votes
1 answer

Reading an embedded H2 database

I am using a 3rd party application written in Java which uses a local embedded H2 database to store data. I want to write a Python app to read this data, and possibly write it back. There are a lot of suggestions around about using the Postgress…
Philip Ridout
  • 887
  • 1
  • 8
  • 14
2
votes
3 answers

ERROR:- 'java' is not recognized as an internal or external command

I have tried to run the Activiti BPM tool under ANT but i am getting the following error :- ERROR:- 'java' is not recognized as an internal or external command; when i tried to start a demo application using CMD command line under windows 7 i got…
John John
  • 1
  • 72
  • 238
  • 501
2
votes
1 answer

H2 database grant thinks sequence is a table

I'm running a script on H2 that does the following: create role admin_role; create user app_user password 'password' ; grant admin_role to app_user; create sequence from_event_seq; grant select on from_event_seq to admin_role; Frustratingly this…
Dave Richardson
  • 4,880
  • 7
  • 32
  • 47
2
votes
5 answers

Using hashmap or H2 database?

I am developing a web application in which I need to store session, user messages etc. I am thinking of using HashMap or H2 database. Please let me know which is better approach in terms of performance and memory utilization. The web site has to…
jaks
  • 4,407
  • 9
  • 53
  • 68