Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Hibernate ORM 6.2 #29736

Closed
odrotbohm opened this issue Dec 23, 2022 · 1 comment
Closed

Compatibility with Hibernate ORM 6.2 #29736

odrotbohm opened this issue Dec 23, 2022 · 1 comment
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Milestone

Comments

@odrotbohm
Copy link
Member

I've just tried to run a build of Spring Data JPA on Hibernate 6.2 CR1. It apparently changes a couple of default settings, which now cause SpringPersistenceUnitInfo.addTransformer(…) being called, which blows up with an IllegalStateException if no LoadTimeWeaver is set.

I am not certain how we want to handle this, but as it looks like the current default bootstrap settings will either have to handle that call more leniently or we will have to change our default settings. Unfortunately, the tickets linked to from the migration guide indicate that the flags are deprecated for removal without replacement.

The comments in EntityManagerFactoryBuilderImpl seem to indicate that they only assume the call to ….addTransformer(…) to have an effect in EE environments anyway. I could get this working with a local copy of SpringPersistenceUnitInfo tweaked to drop the invocation if no load time weaver was specified instead of throwing the exception. SD JPA builds fine then.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Dec 23, 2022
@jhoeller jhoeller self-assigned this Dec 23, 2022
@jhoeller jhoeller added in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Dec 23, 2022
@jhoeller jhoeller added this to the 6.0.4 milestone Dec 23, 2022
@jhoeller
Copy link
Contributor

jhoeller commented Jan 3, 2023

Following that advice, SpringPersistenceUnitInfo just logs a warning in case of no LoadTimeWeaver setup now, leniently ignoring the given transformer in such a case.

If anything else can be addressed for Hibernate ORM 6.2 RC1 or a follow-up RC, there's still a chance for the 6.0.4 release. Otherwise we'll address any remainders in 6.0.5.

@jhoeller jhoeller changed the title Ensure Hibernate 6.2 compatibility Compatibility with Hibernate ORM 6.2 Jan 3, 2023
mdeinum pushed a commit to mdeinum/spring-framework that referenced this issue Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants