h2 Questions

1

When H2 database is in Postgres Mode, how do I check if it supports following statement (upsert / on conflict) INSERT INTO event_log_poller_state (aggregate_type, consumer_group_id, value) VALUES ...
Unprincipled asked 20/7, 2016 at 20:40

1

I have spring boot 2.7.0 maven project that uses flyway 5.2.4. I need to upgrade flyway to newer version. It all started because I needed to update h2 and h2gis-functions so that I could use h2 1.4...
Afeard asked 21/7, 2022 at 15:28

5

I have a Spring boot application where I have H2 as database. I have just one entity which is User. When I run the application, I keep getting DDL errors when creating the table in memory. If I try...
Immolate asked 21/1, 2022 at 6:58

1

Solved

I'm trying to use H2 with Oracle mode since I'm using Oracle 11G on my application but I'm getting an error because when I use pagination the query puts limit and offset on sql. application.propert...
Germaun asked 11/7, 2022 at 1:0

2

Solved

We have been using H2 for our integration tests for quite some time. Now that H2 2.0.202 is out, we are trying to upgrade our codebase to it. We are unable to persist entities, that use java.util.U...
Brocky asked 1/12, 2021 at 14:12

2

For a JUnit-Test using H2 I am saving an entity with a LocalDate property and the value LocalDate.parse("1900-01-01"). The test fails with Expected: is <1900-01-01> but: was <1899-12-31...
Reitman asked 16/4, 2020 at 8:46

2

Solved

I want to insert a date into my H2 database using a sql script. Now I have the following: CREATE TABLE CUSTOMERS ( ID int NOT NULL, FIRSTNAME varchar(50) NOT NULL, LASTNAME varchar(50) NOT NULL,...
Dormie asked 20/5, 2022 at 22:0

1

Solved

I'm creating a Spring Boot application and I'm using Intellij's embedded h2 database. I have added the following lines in my application.properties file: spring.datasource.url=jdbc:h2:~/testdb;MV_S...
Despain asked 16/5, 2022 at 7:8

2

Solved

I've below data.sql file in my src/main/resources/data.sql file. I would like user tabel to be created from user.csv file. DROP TABLE IF EXISTS `USER` CASCADE; CREATE TABLE `user` AS SELECT * FROM ...
Sometime asked 3/4, 2022 at 2:12

3

Solved

I've used in-mem databases in Spring JPA tests many times, and never had a problem. This time, I have a bit more complex schema to initialize, and that schema must have a custom name (some of the e...
Longer asked 22/7, 2019 at 20:9

2

Solved

When I used H2 database the database files are stored at C:\Users\MyName\TestDataBase.db directory. The H2 path is jdbc:h2:~/TestDataBase. This is default H2 database path. Is there a possibility ...
Wildfire asked 18/4, 2017 at 10:58

3

Solved

I have this simple Table (just for test) : create table table ( key int not null primary key auto_increment, name varchar(30) ); Then I execute the following requests: insert into table values...
Carping asked 25/7, 2012 at 16:1

1

I've heard of the H2 database, but how does it work? I'm now scraping data from many websites and don't want to visit the same URL that I've already scraped. Is it possible for me to use the H2 dat...
Messaline asked 12/4, 2022 at 11:59

3

Solved

Now that H2 1.4 is out of beta, I'd like to migrate my old 1.3.175 database to 1.4.195. Background info: In the docs, database upgrade does not mention 1.4 yet. The roadmap still lists "Automati...
Ionian asked 4/5, 2017 at 8:35

3

In Spring Boot project I am trying to see in-memory tables from my IDE. How to access in-memory h2 database from Intellij IDEA. Here is a snippet from my application.yml: h2: datasource: u...
Buckra asked 18/9, 2018 at 14:34

1

I am trying to persist GIS point data in spring-boot 2.6 with a H2 in mem database. I have followed the setup as per here with the exception of the newer spring-boot version. My build.gradle plugin...
Vladikavkaz asked 31/3, 2022 at 11:16

5

I am inserting the data in inMemory database,while inserting the data i am getting an issue, Sample program to insert data in inMemory using boot,JPA,H2db Created Pojo and annotated with JPA ann...
Duumvirate asked 25/7, 2019 at 6:48

4

Solved

I have a Spring Boot 2.5.0 project. I'm using Spring Data JPA with the H2 in-memory database. I want to populate data on startup with a data.sql file but I'm getting a table not found exception. If...
Fillender asked 28/5, 2021 at 19:47

4

After an upgrade from Hibernate 3 to 4, we're working through a few kinks that popped up along the way. One that has us particularly stumped is an UnsupportedOperationException, where an existing o...
Coset asked 4/6, 2012 at 22:40

1

I'm trying to store a long text file into the DBMS. Here is my table definition : @Entity @Table(name = "foos") public class Foo { private static final long serialVersionUID = 7111245814238004034...
Clishmaclaver asked 27/5, 2020 at 14:10

4

Solved

I use hibernate's hbm2ddl to generate schema automatically. Here is my domain: @Entity public class Reader { @Id @GeneratedValue(strategy=GenerationType.AUTO) Long id; @Column(nullable=false...
Rope asked 23/8, 2016 at 7:15

3

My application is build with spring-webmvc and spring-jdbc without spring-boot. In my application.properties I have: spring.h2.console.enabled=true spring.h2.console.path=/h2-console datasource.db...
Gintz asked 22/10, 2020 at 18:8

1

I am having trouble to convert Oracle syntax to H2 syntax: For example (Oracle): LOCK TABLE CAR_CHIP_ID_LOCK IN EXCLUSIVE MODE In H2 it results in a (syntax error) How do I change the oracle gram...
Rodriguez asked 13/7, 2015 at 18:1

1

I upgraded my springboot H2 dependency from 1.4.200 to 2.0.202 , but getting the below exception . Could you please help. Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL s...
Tympanum asked 21/2, 2022 at 7:16

1

Solved

Following accepted answer for question regarding how to init runscript from resources folder: problem with INIT=RUNSCRIPT and relative paths. Connection String: jdbc:h2:mem:;INIT=RUNSCRIPT FROM 'cl...
Herb asked 26/1, 2022 at 11:27

© 2022 - 2024 — McMap. All rights reserved.