hibernate/hibernate-orm · error · HibernateException
Unable to deserialize proxy [%s, %s]; could not locate id ge
Error message
Unable to deserialize proxy [%s, %s]; could not locate id getter method [%s] on entity class [%s]
What it means
Error "Unable to deserialize proxy [%s, %s]; could not locate id getter method [%s] on entity class [%s]" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/proxy/pojo/bytebuddy/ByteBuddyProxyHelper.java:144
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;
}
try {
return serializableProxy.getIdentifierGetterMethodClass()
.getDeclaredMethod( serializableProxy.getIdentifierGetterMethodName() );
}
catch (NoSuchMethodException e) {
throw new HibernateException(
String.format(
Locale.ENGLISH,
"Unable to deserialize proxy [%s, %s]; could not locate id getter method [%s] on entity class [%s]",
serializableProxy.getEntityName(),
serializableProxy.getId(),
serializableProxy.getIdentifierGetterMethodName(),
serializableProxy.getIdentifierGetterMethodClass()
)
);
}
}
private static Method resolveIdSetterMethod(SerializableProxy serializableProxy) {
if ( serializableProxy.getIdentifierSetterMethodName() == null ) {
return null;
}
try {View on GitHub (pinned to fad1729dce)
Solutions
- Define an id getter matching the mapped identifier property on the entity class.
- Ensure serialization/deserialization uses the same entity mapping.
When it happens
Trigger: A name referenced in a mapping, query, or configuration cannot be resolved at runtime.
Common situations: Typos in entity/attribute/mapping names, missing mappings, or refactoring without updating references.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/623c4c7f2c3a81bc.
Report an issue: GitHub.