Skip to main content
The 2024 Developer Survey results are live! See the results

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.

h2
-1 votes
1 answer
23 views

Issue with Changing @Table Annotation to "users" in JPA Entity Class Using H2 Database

I'm encountering an issue with my Java application where changing the @Table name in my entity class causes the application to fail during tests and runtime. Here are the details: Originally, my ...
quarks's user avatar
  • 34.7k
1 vote
1 answer
40 views

Need help setting role based users for springboot authentication

this is my github https://github.com/carmmmm/antiFraudApplication my POST is working, but my GET and DELETE requests don't work. i think i am getting confused with the granted authortity, my Role ...
Carmen Montero's user avatar
0 votes
1 answer
29 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
24 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
35 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
45 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
39 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
94 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
63 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
1 answer
45 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
44 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
74 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
43 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
27 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
57 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

15 30 50 per page
1
2 3 4 5
338