Category "h2"

org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "drop table if exists [*]user CASCADE "; expected "identifier"; SQL statement:

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;

unable to test UUID

I have a spring boot 2.6.7 app, using Liquibase, Gradle and Spock. I have a class that uses a guid format string as the ID: @Entity @Table(name = "devices") pu

Spring data R2DBC with H2 database Failed to obtain R2DBC Connection

I am developing a spring command line application where I connect to a db using data r2dbc. For information, my application is written in Kotlin. the pom file c

Using Liquibase to initialize in-memory H2 for unit tests in Spring Boot application

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 m

H2 database compiled into a native-image is only functional as a client

After build the native image I've the following error I'm using a H2 database in file mode. Do I should understand that it's not possible to use H2 in native m

Error with H2 not creating the schema with my data.sql file

I have this project that I just started and using a model from my teacher I created a simple class to be mapped in the H2. So far no problems I run the applicat

What is wrong with my native query in jpa?

I'm sending a very simple query to the database, but I'm getting an error. It feels like I'm missing something very simple. I guess it wouldn't allow me to crea

Merge query in H2 database giving "Unknown data type:" error

when merge native query is used using JPA, it is resulting into following error: {"ts":"2022-05-05T17:03:12.124+0000","level":"ERROR","message":"SQL Error: 500

How to store H2 database file into project directory

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 da

Column not found when running unit tests in Spring Boot

I have this problem when testing a JPA repository: Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "CREATED_AT" not found; SQL statement: ins

In H2 database, the auto_increment field is incremented by 32?

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 followin