Hibernate – Error accessing stax stream – with hibernate.properties

I’m getting this error : INFO: HHH000205: Loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver, hibernate.dialect=org.hibernate….

Saving new entity with JPARepository throws InvalidDataAccessResourceUsageException: could not extract ResultSet

Currently working on a REST API with Springboot + JPA/Hibernate + Oracle. I have an entity called Foo linked to a Bar entity with @ManyToOne (Mulitple Foo can have one Bar). When I send an HTTPS GET …

java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast or BeanUtils.copyProperties not working

am new to JPA and springboot unable to get the api response when am using @Query param(I try achieve the inner join) Repositoty class: @Transactional(rollbackFor = Exception.class) @Modifying …

HIbernate “StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1”

When an existing user makes a request the method first deletes the oldest record before saving the new request. The code below works fine IF the requests don’t come in too rapidly (using an Oracle DB)….

config.ConfigurationException: Could not locate cfg.xml resource [hibernate.cfg.xml]

I am building a hibernate application that creates, modify, and query tables from a database. The project was running perfectly fine without having this error, when I try to run it now I got this …

How to map column with type BIT(24) in PostgreSQL with Hibernate

I have a table with a column which type is a bit (24). I tried to use String and when I try to get this object it maps well, but when I try to save it, Hibernate throws Exception: org.postgresql.util….

JPA Hibernate Annotation Issue

I have three Entities i’m modeling and am having issues with the associated annotations. I basically have a class that I intend on returning to the caller, a nested listed of Project’s and the Project …

Create and use database function with JPA

I want to create and immediatly use a database function in a single sql call. As an example, the following works fine in PostgreSQL SQL Editor : CREATE OR REPLACE FUNCTION pg_temp.get(IN nb BIGINT) …

JPA Entity that has a OneToMany relationship and want to use DTO

I have an entity called “Review” that has a OneToOne relationship with a “User” entity and a OneToMany relationship with a “ReviewStage” entity. I have implemented a DTO …

Spring Data JPA Distinct Returning Duplicate Values

In my Spring boot application I have a query which should return a distinct List of Focus’ (works perfectly in MySQL) @Query(value = “SELECT DISTINCT * FROM Focus F ” + “…