hibernate/hibernate-orm · error · IllegalStateException

Unable to deserialize a SerializableProxy proxy: the bytecod

Error message

Unable to deserialize a SerializableProxy proxy: the bytecode provider is not ByteBuddy.

What it means

Error "Unable to deserialize a SerializableProxy proxy: the bytecode provider is not ByteBuddy." thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/proxy/pojo/bytebuddy/SerializableProxy.java:149

				? getFallbackBytecodeProvider()	// When the session factory is not available fallback to local bytecode provider
				: castBytecodeProvider( sessionFactory.getServiceRegistry().getService( BytecodeProvider.class ) );

	}

	private static BytecodeProviderImpl getFallbackBytecodeProvider() {
		var provider = fallbackBytecodeProvider;
		if ( provider == null ) {
			provider = fallbackBytecodeProvider = castBytecodeProvider( buildDefaultBytecodeProvider() );
		}
		return provider;
	}

	private static BytecodeProviderImpl castBytecodeProvider(BytecodeProvider bytecodeProvider) {
		if ( bytecodeProvider instanceof BytecodeProviderImpl impl ) {
			return impl;
		}
		else {
			throw new IllegalStateException( "Unable to deserialize a SerializableProxy proxy: the bytecode provider is not ByteBuddy." );
		}
	}
}

View on GitHub (pinned to fad1729dce)

Solutions

  1. Configure the ByteBuddy bytecode provider (the default) for proxy deserialization.
  2. Do not mix serialized proxies across different bytecode providers.

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/1ff236b613567b35. Report an issue: GitHub.