hibernate/hibernate-orm · error · HibernateException
Unable to deserialize proxy [%s, %s]; could not locate id se
Error message
Unable to deserialize proxy [%s, %s]; could not locate id setter method [%s] on entity class [%s]
What it means
Error "Unable to deserialize proxy [%s, %s]; could not locate id setter 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:168
serializableProxy.getIdentifierGetterMethodName(),
serializableProxy.getIdentifierGetterMethodClass()
)
);
}
}
private static Method resolveIdSetterMethod(SerializableProxy serializableProxy) {
if ( serializableProxy.getIdentifierSetterMethodName() == null ) {
return null;
}
try {
return serializableProxy.getIdentifierSetterMethodClass()
.getDeclaredMethod( serializableProxy.getIdentifierSetterMethodName(),
serializableProxy.getIdentifierSetterMethodParams() );
}
catch (NoSuchMethodException e) {
throw new HibernateException(
String.format(
Locale.ENGLISH,
"Unable to deserialize proxy [%s, %s]; could not locate id setter method [%s] on entity class [%s]",
serializableProxy.getEntityName(),
serializableProxy.getId(),
serializableProxy.getIdentifierSetterMethodName(),
serializableProxy.getIdentifierSetterMethodClass()
)
);
}
}
}
View on GitHub (pinned to fad1729dce)
Solutions
- Define an id setter matching the mapped identifier property on the entity class.
- Check that the identifier property access type is consistent.
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/f67bfd7cd9470a40.
Report an issue: GitHub.