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/proxy/pojo/bytebuddy/ByteBuddyProxyHelper.java:119

		final var interceptor = new ByteBuddyInterceptor(
				proxy.getEntityName(),
				proxy.getPersistentClass(),
				proxy.getInterfaces(),
				proxy.getId(),
				resolveIdGetterMethod( proxy ),
				resolveIdSetterMethod( proxy ),
				proxy.getComponentIdType(),
				null,
				overridesEquals( proxy.getPersistentClass() )
		);

		// note: interface is assumed to already contain HibernateProxy.class
		try {
			final var proxyClass = buildProxy( proxy.getPersistentClass(), proxy.getInterfaces() );
			final var instance = (PrimeAmongSecondarySupertypes) proxyClass.getDeclaredConstructor().newInstance();
			final var proxyConfiguration = instance.asProxyConfiguration();
			if ( proxyConfiguration == null ) {
				throw new HibernateException( "Produced proxy does not correctly implement ProxyConfiguration" );
			}
			proxyConfiguration.$$_hibernate_set_interceptor( interceptor );
			final var hibernateProxy = instance.asHibernateProxy();
			if ( hibernateProxy == null ) {
				throw new HibernateException( "Produced proxy does not correctly implement HibernateProxy" );
			}
			return hibernateProxy;
		}
		catch (Throwable t) {
			throw new HibernateException( "Bytecode enhancement failed for entity '"
					+ proxy.getEntityName() + "'", t );
		}
	}

	private static Method resolveIdGetterMethod(SerializableProxy serializableProxy) {
		if ( serializableProxy.getIdentifierGetterMethodName() == null ) {
			return null;
		}

View on GitHub (pinned to fad1729dce)

Solutions

  1. Verify ByteBuddy version compatibility with this Hibernate release.
  2. Remove conflicting bytecode manipulation agents.

When it happens

Trigger: A runtime precondition of the Hibernate API is violated.

Common situations: Occurs when application code or configuration does not satisfy the documented contract of the API being called.


AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22). Data as JSON: /api/errors/907e86fc464b179b. Report an issue: GitHub.