Skip to content

Conversation

yrodiere
Copy link
Member

Note we also handle abstract classes more gracefully, but they've always
been allowed (though the warning was not explicit about the reason).
This replaces these logs:

2025-08-18 15:25:43,530 WARN  [io.qua.hib.orm.run.pro.ProxyDefinitions] (main) Could not generate an enhanced proxy for entity 'io.quarkus.hibernate.orm.applicationfieldaccess.PublicFieldAccessInheritanceTest$MyAbstractEntity' (class='io.quarkus.hibernate.orm.applicationfieldaccess.PublicFieldAccessInheritanceTest.MyAbstractEntity') as it's abstract. Your application might perform better if this class was non-abstract.
2025-08-18 15:25:44,075 WARN  [org.hib.met.int.EntityRepresentationStrategyPojoStandard] (JPA Startup Thread) HHH000305: Could not create proxy factory for:io.quarkus.hibernate.orm.applicationfieldaccess.PublicFieldAccessInheritanceTest$MyAbstractEntity: org.hibernate.HibernateException: Could not lookup a pre-generated proxy class definition for entity 'io.quarkus.hibernate.orm.applicationfieldaccess.PublicFieldAccessInheritanceTest$MyAbstractEntity'. Falling back to enforced eager mode for this entity!
	at io.quarkus.hibernate.orm.runtime.customized.QuarkusProxyFactory.postInstantiate(QuarkusProxyFactory.java:60)
	[...]

With these:

2025-08-18 16:03:26,754 WARN  [org.hib.met.int.EntityRepresentationStrategyPojoStandard] (JPA Startup Thread) HHH000305: Could not create proxy factory for:io.quarkus.hibernate.orm.applicationfieldaccess.PublicFieldAccessInheritanceTest$MyAbstractEntity: org.hibernate.HibernateException: Could not lookup a pre-generated proxy class definition for entity 'io.quarkus.hibernate.orm.applicationfieldaccess.PublicFieldAccessInheritanceTest$MyAbstractEntity' (class='io.quarkus.hibernate.orm.applicationfieldaccess.PublicFieldAccessInheritanceTest.MyAbstractEntity'): this class is abstract. Your application might perform better if this class was non-abstract.
	at io.quarkus.hibernate.orm.runtime.customized.QuarkusProxyFactory.postInstantiate(QuarkusProxyFactory.java:77)
	[...]

Also, this *might* prevent unnecessary warnings in some cases if
our implementation of ProxyDefinitions#needsProxyGeneration turns out to
have false positives, because in that case Hibernate ORM won't requrest
the proxy class on bootstrap, and thus we won't log anything.
…r 7.0 upgrade

Remove some unnecessary code, and optimize a few things (e.g. avoid
re-loading the HibernateProxy type for every proxy generation).
@quarkus-bot quarkus-bot bot added area/hibernate-orm Hibernate ORM area/hibernate-reactive Hibernate Reactive labels Aug 18, 2025
Copy link

quarkus-bot bot commented Aug 18, 2025

/cc @gsmet (hibernate-orm)

Copy link

quarkus-bot bot commented Aug 18, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 3edc3a6.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

@gastaldi gastaldi requested a review from gsmet August 19, 2025 03:46
@gsmet gsmet merged commit 456b137 into quarkusio:main Aug 19, 2025
47 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.28 - main milestone Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/hibernate-orm Hibernate ORM area/hibernate-reactive Hibernate Reactive

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove support for Hibernate ORM proxy generation at static init

3 participants