Skip to main content

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.

0 votes
1 answer
17 views

H2 Database Timestring parsing

I need to parse the following timestamps in h2 database: "2024-07-18T13:55:02.690632+00:00" "2024-07-18T13:55:02.703070+00:00+00:00" If I remove the trailing zeros after the plus ...
Steve Lowry's user avatar
0 votes
0 answers
15 views

Restart Keycloak with H2 embedded database after VM crash

my VM where Keycloak (version 17) is installed has crashed and I can't restart it at the moment. Unfortunately it was an h2 installation and I absolutely need to recover the data. Here is the log file:...
alfredogangemi's user avatar
0 votes
0 answers
28 views

H2 not recognizes parameters with coalesce() causing org.hibernate.exception.GenericJDBCException: could not prepare statement [Unknown data type: "?"

In my Criteria Select API test I want to select from two joined DB tables. The WHERE condition uses two parameters pRefDateFrom and pRefDateTo. If these two parameters are used as first argument of ...
JBStonehenge's user avatar
0 votes
0 answers
44 views

JPA repository findBy return different result when using H2 and MySQL

This is the simply version of my application. I have 2 entity. Customer.java package com.udacity.jdnd.course3.critter.user; import java.util.List; import java.util.ArrayList; import com.udacity.jdnd....
user26256859's user avatar
-1 votes
0 answers
32 views

Error creating 2 database users in SpringBoot3 app with Liquibase

I am trying to create an app with SpringBoot3, Hibernate and Liquibase. For now I have just implemented the liquibase part and wanted to get it working before adding business logic. The app defines 2 ...
Akash Sharma's user avatar
0 votes
1 answer
70 views

Sonatype Nexus database migration from H2 in EC2 to external PSQL

I currently have a Sonatype Nexus instance running on an EC2 instance with the H2 database. I'm looking to migrate the database to PostgreSQL. Sonatype Nexus offers an in-built option only for the Pro ...
Raphaël's user avatar
1 vote
1 answer
60 views

How to configure Hibernate6 default for Timestamp with a nanosecond precision?

I want Hibernate to save LocalDateTime properties in an H2 Database with a precision that contains nano seconds (Timestamp(9)) by default. "By default" means attaching @Column(...
Ralph's user avatar
  • 120k
0 votes
0 answers
36 views

h2db: can I use parameterized WITH clauses (CTEs) in subqueries

I'm using h2db 2.2.224 as Test-DB in Spring Boot 3.2.5, running a JPA native query. I have a WITH clause (CTE) that uses a query parameter. This WITH clause does not work in a subquery against h2db. ...
bahnson's user avatar
  • 13
0 votes
1 answer
41 views

is there any way to write test cases for repositories in spring boot without using H2 daatabase?

I am working on a Spring Boot application and need to write test cases for my repository layer in a way like database should create using my flyway script. However, I want to avoid using an in-memory ...
Harshang Akabari's user avatar
0 votes
0 answers
62 views

Cannot invoke "...[Name]Repository" because "this.[name]Repository" is null

I am trying to automatise tests using Cucumber for my Spring Boot Web App, I want to ensure my database is not empty for a test scenario. The issue is that My repository seem null and I cannot figure ...
None's user avatar
  • 11
0 votes
0 answers
40 views

A GET request using IntelliJ http-client returns an HTTP 200 response with an empty response body

I signed up to my /auth/signup endpoint of my API, and it registered and returned an object of the currently signed up user. POST http://localhost:8082/auth/signup Content-Type: application/json { &...
Pascal Torti's user avatar
0 votes
0 answers
26 views

H2 Database connection fail

error image (https://i.sstatic.net/mLNGGFBD.png) h2 database yml setting (https://i.sstatic.net/Ol0nldd1.png) I tried to connect to h2 database from h2 console, but the error in the image occurred, ...
Jonghyun Lee's user avatar
0 votes
1 answer
56 views

Spring Boot JPA not inserting data in DB, while data is printed in console upon starting

I wrote this code to insert data in DB, while data is being printed in console after starting the application. The API URL is not working, I noticed that the data is populating in DB only. I am using ...
At555's user avatar
  • 11
0 votes
0 answers
19 views

Connecting to a h2 database replaces the .mv.db file with a blank

I've converted h2-2.1.214.jar using ikvmc but everytime i point to a embedded (local) database, it auto creates a new one and replaces the existing .mv.db with a new db. I've tested the same exact ...
LuxC's user avatar
  • 147
0 votes
0 answers
52 views

H2 fails to create table for JPA entity

I have been writing unit tests for my company's application backend. Most of the functionality of the backend is CRUD operations on the database so I configured my tests to use an EntityManager ...
Supetorus's user avatar

15 30 50 per page
1
2 3 4 5
338