95,147 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
23
views
org.hibernate.query.sqm.UnknownEntityException: Could not resolve entity class after upgrading to hibernate 6.6
I have a test case that tests all the DAOs in my project. It uses openpojo to get the list of all DAO classes. The test case then iterates over the list of DAO classes and invokes all methods in them ...
Best practices
0
votes
2
replies
40
views
Best way to merge Keycloak data and Application data
I’m developing an application in which login and roles are entirely handled by Keycloak. My Java backend has an application database that also contains additional user business data. I’ve been asked ...
0
votes
0
answers
67
views
Spring Boot 2.7.x JPA @ManyToOne join returns empty list on GET, but works on POST
In a Spring Boot 2.7.x application with Hibernate/JPA, there are two tables:
tickets
complaint_id (PK, VARCHAR(255))
attachment
complaint_id (FK, VARCHAR(255))
other fields: id, file_name, ...
1
vote
0
answers
58
views
Hibernate Dirty Checking
I'm using Spring Data JPA with an entity that contains a Map<String, String> field.
The map is stored in the database as a TEXT column (JSON string). JPA automatically stores the map as a ...
0
votes
1
answer
97
views
Spring Boot 3.3 migration. Cannot resolve reference to bean jpaSharedEM_entityManagerFactory
I'm migrating from Spring Boot 2.7 to Spring Boot 3.3.13. This means that I'm migrating even from Hibernate 5 to Hibernate 6.
I'm having an annoying problem when I start my Spring Application about ...
3
votes
0
answers
49
views
Hibernate OptimisticLockException in Java 21 – works fine in Java 17
Title:
Hibernate OptimisticLockException in Java 21 – works fine in Java 17
Body:
I recently upgraded my project from Java 17 → Java 21, and one of my Hibernate test cases started failing with this ...
1
vote
0
answers
79
views
How to pass client location into custom JPA ID generator?
Working on a scalable custom ID generator in JPA. The format I want to achieve is:
<first three letters of country or region> + <year> + <sequence number>
For example: USA2025001
I'm ...
Advice
0
votes
1
replies
54
views
Guidance on Upgrading Hibernate from 3.4.3 to 5.4.33 in a Java 8 / Java EE (Maven) Project
I'm in the process of upgrading Hibernate from version 3.4.3 to 5.4.33 in a Java 8 + Java EE application built with Maven.
So far, I haven’t been able to locate any official migration guides, ...
5
votes
1
answer
149
views
Integrating a Jakarta Persistence implementation with modular JavaFX/Maven/JLink app
Quick background information for context: I'm writing a relatively small tool for a small gaming community to download and manage user generated content. It's a modular Java 24 + JavaFX Project done ...
-3
votes
0
answers
89
views
JPA/Hibernate EntityGraph with Specification and Pagination not loading all related entities correctly
JPA/Hibernate EntityGraph with Specification and Pagination not loading all related entities correctly
I'm working on a JHipster-generated application and need to create APIs that load entities from ...
1
vote
1
answer
89
views
JPA OneToOne Field 'price_id_price_id' doesn't have a default value
how do I resolve that error? Thank to all answers.
org.springframework.orm.jpa.JpaSystemException: could not execute
statement [Field 'price_id_price_id' doesn't have a default value]
[insert into ...
1
vote
2
answers
105
views
Hibernate 6 unidirectional many to one relationship and database cascading deletes
I have an extensive JPA model which exclusively uses unidirectional @ManyToOne relationships from child to parent, for example like this.
public class Child {
@ManyToOne(optional = false)
@...
1
vote
1
answer
57
views
Redis as L2 cache for Hibernate can't find the redisson.yaml in my deployments
I am trying to make the redis sentinel pods in my cluster as my L2 cache for hibernate JPA.
I am using wildfly 32.0.1.Final server with my deployment structure having a ear with a lib and a META-INF ...
1
vote
0
answers
51
views
Liquibase ValidationFailedException and Logging Error
I have two issues with Liquibase.
When deploying my war file I get the error:
15:31:25.985 [main] WARN org.hibernate.orm.deprecation -- HHH90000012: Recognized obsolete hibernate namespace http://...
2
votes
0
answers
47
views
Hibernate Envers does not persist foreign key in audit table
I'm using Hibernate Envers to audit a @OneToMany relationship between two entities: ParentEntity and ChildEntity.
I am not using @ManyToOne on the ChildEntity side. Instead, I store the foreign key ...