hibernate/hibernate-orm · error · IllegalStateException
Unable to deserialize a SerializableProxy proxy: the…
Error message
Unable to deserialize a SerializableProxy proxy: the bytecode provider is not ByteBuddy.
What it means
Bytecode-provider guard in SerializableProxy.castBytecodeProvider: deserializing a SerializableProxy requires the ByteBuddy BytecodeProviderImpl, but the registered provider (or the fallback) is a different implementation (e.g. the default provider was overridden). The faulty configuration is a non-ByteBuddy bytecode provider in the environment where the proxy is being deserialized.
Solutions
- Configure the ByteBuddy bytecode provider (the default) for proxy deserialization.
- Do not mix serialized proxies across different bytecode providers.
Defensive patterns
Strategy: type-guard
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.
Appendix: 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)