hibernate/hibernate-orm · error · HibernateException
Produced proxy does not correctly implement ProxyConfigurati
Error message
Produced proxy does not correctly implement ProxyConfiguration
What it means
Error "Produced proxy does not correctly implement ProxyConfiguration" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/BasicProxyFactoryImpl.java:69
.implement( constants.INTERFACES_for_ProxyConfiguration )
.intercept( helpers.getInterceptorFieldAccessor() )
)
);
try {
proxyClassConstructor = proxyClass.getConstructor();
}
catch (NoSuchMethodException e) {
throw new AssertionFailure( "Could not access default constructor from newly generated basic proxy" );
}
}
@Override
public Object getProxy() {
final var instance = instantiateProxy();
final var proxyConfiguration = instance.asProxyConfiguration();
if ( proxyConfiguration == null ) {
throw new HibernateException( "Produced proxy does not correctly implement ProxyConfiguration" );
}
// Create a dedicated interceptor for the proxy.
// This is required as the interceptor is stateful.
proxyConfiguration.$$_hibernate_set_interceptor(
new PassThroughInterceptor( proxyClass.getName() ) );
return instance;
}
private PrimeAmongSecondarySupertypes instantiateProxy() {
try {
return (PrimeAmongSecondarySupertypes) proxyClassConstructor.newInstance();
}
catch (Throwable t) {
throw new HibernateException( "Unable to instantiate proxy instance", t );
}
}
public boolean isInstance(Object object) {View on GitHub (pinned to fad1729dce)
Solutions
- Regenerate/rebuild enhanced classes and proxies with the same Hibernate version used at runtime; clear stale build outputs.
Example fix
Regenerate/rebuild enhanced classes and proxies with the same Hibernate version used at runtime; clear stale build outputs.
When it happens
Trigger: Bytecode enhancement, proxy creation, or lazy interception is applied to an incompatible class or configuration.
Common situations: Build-time enhancement with module-system restrictions, mismatched Hibernate versions between build and runtime, or hibernate.bytecode.provider=none with a model that needs proxies.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/3e400b535e539326.
Report an issue: GitHub.