-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
area/hibernate-ormHibernate ORMHibernate ORMarea/housekeepingIssue type for generalized tasks not related to bugs or enhancementsIssue type for generalized tasks not related to bugs or enhancements
Milestone
Description
Description
The Quarkus extension for Hibernate should already generate all proxies at build time. Currently, if we need to generate a proxy at static init, we trigger a warning and ask people to report it.
See:
Lines 138 to 155 in 6b17de4
if (preGeneratedProxy == null) { | |
if (match) { | |
LOGGER.warnf("Unable to find a build time generated proxy for entity %s", | |
persistentClass.getClassName()); | |
} else { | |
//TODO: this should be changed to an exception after 1.4 | |
//really it should be an exception now | |
LOGGER.errorf( | |
"Unable to use a build time generated proxy for entity %s, as the build time proxy " + | |
"interfaces %s are different to the runtime ones %s. This should not happen, please open an " + | |
"issue at https://github.com/quarkusio/quarkus/issues", | |
persistentClass.getClassName(), preProxy.getProxyInterfaces(), proxyInterfaces); | |
} | |
Class<?> proxyDef = byteBuddyProxyHelper.get().buildProxy(mappedClass, toArray(proxyInterfaces)); | |
return proxyDef; | |
} else { | |
return preGeneratedProxy; | |
} |
We had no such report in years, AFAICT. Let's change this warning to an error and remove all code that supports generating proxies at static init. This would include using a no-op bytecode provider (similar to io.quarkus.hibernate.orm.runtime.service.bytecodeprovider.RuntimeBytecodeProvider
) at static init.
See also hibernate/hibernate-orm#9831 (comment)
Implementation ideas
No response
Metadata
Metadata
Assignees
Labels
area/hibernate-ormHibernate ORMHibernate ORMarea/housekeepingIssue type for generalized tasks not related to bugs or enhancementsIssue type for generalized tasks not related to bugs or enhancements