jakartaee / persistence

https://jakartaee.github.io/persistence/
Other
187 stars 55 forks source link

EntityManagerFactory conflict error when upgrade to 3.2.0-M1 #569

Closed wwulfric closed 5 months ago

wwulfric commented 5 months ago

EntityManagerFactory interface [interface org.hibernate.SessionFactory] seems to conflict with Spring's EntityManagerFactoryInfo mixin - consider resetting the 'entityManagerFactoryInterface' property to plain [jakarta.persistence.EntityManagerFactory] at org.springframework.orm.jpa.Abstract

gavinking commented 5 months ago

This is the issue tracker for the Jakarta Persistence specification.

stag33 commented 4 months ago

What's the solution for the above issue? I am stuck at this for a month

gavinking commented 4 months ago

The best solution to this problem is to stop using Spring and start using Jakarta EE instead.

stag33 commented 4 months ago

It is difficult to quit spring as my entire architecture is based on spring boot MS. I am working on upgrading on one of the modules to spring boot 3.2.2 and JDK 17. Is there any alternate way to bypass this error?...like downgrading spring version or jakarta version?

gavinking commented 4 months ago

(For the record, you might possibly get a more helpful answer if you ask about your Spring problems in an issue tracker for Spring.)

wwulfric commented 4 months ago

It is difficult to quit spring as my entire architecture is based on spring boot MS. I am working on upgrading on one of the modules to spring boot 3.2.2 and JDK 17. Is there any alternate way to bypass this error?...like downgrading spring version or jakarta version?

springboot 3.2.1, spring-data-bom 2023.1.2, jakarta.persistence-api 3.1.0 works for me

stag33 commented 4 months ago

Hi @wwulfric, tried with above versions, but didnt work for me. Can you share your github repository link or code where you faced this error?

wwulfric commented 4 months ago

@stag33 sorry but this repository is internal to the company; I can't make it open source.

stag33 commented 4 months ago

@wwulfric, same case for me, my repository is also internal, if you used spring-data-bom, did you remove spring-data-jpa from pom.xml?

wwulfric commented 4 months ago

@stag33 yes. spring-data-jpa'version is 3.2.2 and spring orm 6.1.2

stag33 commented 4 months ago

I did not understand your last statement, Were you using spring-data-jpa and spring-data-bom at the same time?

wwulfric commented 4 months ago

spring-data-jpa is introduced by spring-data-bom(https://www.baeldung.com/spring-maven-bom