Category "h2"

Getting Connection is broken: "java.io.EOFException: 192.168.1.178:52002" [90067-200]

I have spring boot application which starts H2 db with below URL jdbc:h2:~/data/test;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;TRACE_LEVEL_SYSTEM_OUT=3;AUTO_SERVE

Spring Boot and H2 Table Population Error: org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL

I am having trouble getting an H2 In Memory database to populate. The idea here to have the BuildingCode which is unique as a primary key and id. I get the foll

H2 database error for SQL Server prod DB "BOOLEAN" and "CHARACTER VARYING(5)" are not comparable

SQL Server has bit type column to store true and false. In where clause we check column_name = 'false' it works fine on SQL Server (dev and prod env) but it fai

Not able to run Junit test with H2 database SpringBoot

I have a strange problem with my unit test.. My goal is to run test on a H2 database and not on my Mysql database.. Actually the strange thing is that when i cl

How to work with column containg array in H2 database to get n 1 row

I am new to H2 database. I have 3 tables in database for example, table t1 : ID desc something condition_id 1 EN 142868 151508 XYZ [4686, 4687] table condition

Unable to create a ConnectionFactory Error with H2 and R2DBC in Spring Boot with WebFlux

I've created a Java Spring Boot service using the WebFlux reactive module, H2 in-memory database, and R2DBC reactive driver. When I run the service, it fails wi

Saving large files in h2 database

I recently updated the h2 database in my springboot project to 2.1.210. This induced some problems, most of them I was able to fix myself. The one that I can't

I cant create h2 database before tests, but after first test other tests work fine

i am trying to make my tests on h2 database. But my first test always falling with error nested exception is io.r2dbc.spi.R2dbcBadGrammarException: [90079] [900

persistence jsonb field to h2 using hibernate

source code I want to use jsonb column type. When I used postgresql there is no problem. But when I use H2 I can not persist my entity. Native sql works but whe

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