Questions tagged [h2db]

H2 is an open source SQL database engine 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 disk footprint (size of the jar file) is about 1 MB.

H2 is an open source SQL database engine 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 disk footprint (size of the jar file) is about 1 MB.

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.

This tag is synonym for H2 tag

Wiki

Issues

93 questions
0
votes
0 answers

Spring boot + gradle - H2 db is not accessible with 404 error

My H2 web interface is not accessible. Though Java code can get data but web interface is failing to connect to it. This started happening after I rebooted my system. Whitelabel Error Page This application has no explicit mapping for /error, so you…
Ankur Saran
  • 99
  • 1
  • 9
0
votes
1 answer

Inserted records getting committed in DB without committing it manually

I have created a database transaction and I am inserting records in Table1 of H2 DB. But no commits done yet. In between this process, after executing half of the records, I execute one create statement(created Table2). Table2 is created and along…
IfOnly
  • 540
  • 1
  • 4
  • 17
0
votes
0 answers

H2 Database not working on Linux

I'm using Maven on NetBeans to import H2 Database to my project and the following code to init. a simple embedded database: //... Class.forName("org.h2.Driver"); //... connection = DriverManager.getConnection("jdbc:h2:~/MCUsers"); //... When I run…
OmriSoudry
  • 361
  • 3
  • 13
0
votes
1 answer

H2DB console application never stops

I use hibernate + H2DB: org.h2.Driver jdbc:h2:./datafile
Stepan Yakovenko
  • 8,670
  • 28
  • 113
  • 206
0
votes
1 answer

HQL left outer join with missing mapping

I am using hibernate/hql to create my querys. Now I got a problem I'm stuck on for quite some hours now, to understand the situation here is my sorrounding: I got 3 Tables I need to get Informations from, with the connection/assignment tables I got…
Nico
  • 1,727
  • 1
  • 24
  • 42
0
votes
0 answers

Converting epoch timestamp in H2 database

I am having preexisting table name 'ABC' in H2 Database.and description is, FIELD | TYPE | NULL | KEY | DEFAULT ID | DECIMAL(19) | NO | | NULL EVENT |…
Pert8S
  • 582
  • 3
  • 6
  • 21
0
votes
1 answer

How to execute H2db generated statment in postgres

Below statmen generated from h2 INSERT INTO EPSG_ALIAS (ALIAS_CODE, OBJECT_TABLE_NAME, OBJECT_CODE, NAMING_SYSTEM_CODE, ALIAS, REMARKS) VALUES (1431, 'Datum', 6123, 7300, STRINGDECODE('Kartastokoordinaattij\ufffdrjestelm\ufffd…
Madhava
  • 77
  • 2
  • 9
0
votes
0 answers

SQL Insert Column not found - Maps

I want to create multiple HashMaps with same keys. I fixed this by using @SQLInsert. But now I am getting a Column not found Error, maybe I annotate it wrong? @ElementCollection @CollectionTable(name = "BACKUP_INVENTORY", joinColumns = …
0
votes
1 answer

Blob.setBinaryStream(1) throws Invalid value "1" for parameter "length" [90008-190]

I'm trying to create blob via Hibernate 4.3.5 API. H2 1.4.190 in-memory. Originally code was written for Oracle DB and now we are trying to use H2 for unit testing. Blob blob = Hibernate.getLobCreator(hibernateSession).createBlob(new…
Iwavenice
  • 556
  • 5
  • 22
0
votes
1 answer

h2 doesn't start programmatically

I have wrote following code: private static void startH2(){ Server server = null; try { server = Server.createTcpServer("-tcpAllowOthers").start(); Class.forName("org.h2.Driver"); Connection conn…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
1 answer

Empty Object Explorer When Opening a H2 embedded database(.mv.db file) in DbVisualizer

EDIT: Please ignore the Database Type "MySQL". I have it set to H2 currently, I was just playing around with settings at the time of the screengrabs in an attempt to see if I could pinpoint what was going wrong. My friend came to me tonight with an…
SQL Taylor
  • 138
  • 11
0
votes
1 answer

org.h2.jdbc.JdbcSQLException: General error: "java.lang.NullPointerException" [50000-178]

I have a small 30 MB h2 database file. Driver version is 1.4.178. Everything worked fine but recently the DB stop to work with exception: org.h2.jdbc.JdbcSQLException: General error: "java.lang.NullPointerException" [50000-178] at…
Subha Chandra
  • 751
  • 9
  • 23
0
votes
1 answer

Getting "No Persistence provider for EntityManager named" when Maven build is run with Junit testcases

When running the maven build with Junit getting "No Persistence provider for EntityManager named" error.Not able to identify what is missing in my code. Main class: public class ApprovalHistory { @PersistenceContext(unitName =…
abcd123
  • 61
  • 9
0
votes
0 answers

H2 MySQL mode: use of NULL for AUTO_INCREMENT column doesn't work with INSERT... ON DUPLICATE KEY UPDATE

Using MySQL mode in H2, found a situation that works for MySQL but not H2. If inserting and specifying NULL value for an AUTO_INCREMENT column, if there is a duplicate key conflict, H2 silently fails to apply the ON DUPLICATE KEY UPDATE clause. A…
0
votes
1 answer

H2DB: Using the AND condition causing error in local memory

I have a table called classification that has a column named product_id and a column named node_id. I'm trying to make a simple query in the h2 console as so: select * from classification where product_id =1 and node_id = 01010101 It gives me…