Closed rgordeev closed 2 months ago
As explained in the Installation Guide, you need to use the jakarta
classifier:
<dependency>
<groupid>io.hypersistence</groupid>
<artifactid>hypersistence-optimizer</artifactid>
<version>2.10.0</version>
<classifier>jakarta</classifier>
</dependency>
Description: I am using Spring Boot 3.3 in my project, which uses the
jakarta.persistence
package as part of its Jakarta EE 9+ compliance. However, the hypersistence-optimizer library includes code that referencesjavax.persistence.EntityManagerFactory
instead ofjakarta.persistence.EntityManagerFactory
.This causes a compilation error in my project, as Spring Boot 3.3 and Hibernate 6.x rely on the Jakarta EE API (jakarta.persistence) rather than the javax.persistence API, which is now outdated in modern versions of Spring Boot.
Here is the error message:
Problem Code: The JpaConfig class in hypersistence-optimizer is currently written as:
Proposed Solution: To maintain compatibility with modern Spring Boot and Hibernate versions (e.g., Spring Boot 3.3 and Hibernate 6.x), the
javax.persistence
imports should be updated tojakarta.persistence
:Environment: