{"record":{"id":"623c4c7f2c3a81bc","repo":"hibernate/hibernate-orm","slug":"unable-to-deserialize-proxy-s-s-could-not-lo","errorCode":null,"errorMessage":"Unable to deserialize proxy [%s, %s]; could not locate id getter method [%s] on entity class [%s]","messagePattern":"Unable to deserialize proxy \\[(.+?), (.+?)\\]; could not locate id getter method \\[(.+?)\\] on entity class \\[(.+?)\\]","errorType":"exception","errorClass":"HibernateException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/proxy/pojo/bytebuddy/ByteBuddyProxyHelper.java","lineNumber":144,"sourceCode":"\t\t\treturn hibernateProxy;\n\t\t}\n\t\tcatch (Throwable t) {\n\t\t\tthrow new HibernateException( \"Bytecode enhancement failed for entity '\"\n\t\t\t\t\t+ proxy.getEntityName() + \"'\", t );\n\t\t}\n\t}\n\n\tprivate static Method resolveIdGetterMethod(SerializableProxy serializableProxy) {\n\t\tif ( serializableProxy.getIdentifierGetterMethodName() == null ) {\n\t\t\treturn null;\n\t\t}\n\n\t\ttry {\n\t\t\treturn serializableProxy.getIdentifierGetterMethodClass()\n\t\t\t\t\t.getDeclaredMethod( serializableProxy.getIdentifierGetterMethodName() );\n\t\t}\n\t\tcatch (NoSuchMethodException e) {\n\t\t\tthrow new HibernateException(\n\t\t\t\t\tString.format(\n\t\t\t\t\t\t\tLocale.ENGLISH,\n\t\t\t\t\t\t\t\"Unable to deserialize proxy [%s, %s]; could not locate id getter method [%s] on entity class [%s]\",\n\t\t\t\t\t\t\tserializableProxy.getEntityName(),\n\t\t\t\t\t\t\tserializableProxy.getId(),\n\t\t\t\t\t\t\tserializableProxy.getIdentifierGetterMethodName(),\n\t\t\t\t\t\t\tserializableProxy.getIdentifierGetterMethodClass()\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate static Method resolveIdSetterMethod(SerializableProxy serializableProxy) {\n\t\tif ( serializableProxy.getIdentifierSetterMethodName() == null ) {\n\t\t\treturn null;\n\t\t}\n\n\t\ttry {","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/proxy/pojo/bytebuddy/ByteBuddyProxyHelper.java#L126-L162","documentation":"Deserialization guard in resolveIdGetterMethod: the SerializableProxy records an identifier getter method name that no longer exists on the recorded entity class (getDeclaredMethod threw NoSuchMethodException). Typically caused by the entity class changing between serialization and deserialization; the faulty input is the recorded getter name/class pair.","triggerScenarios":"A name referenced in a mapping, query, or configuration cannot be resolved at runtime.","commonSituations":"Typos in entity/attribute/mapping names, missing mappings, or refactoring without updating references.","solutions":["Define an id getter matching the mapped identifier property on the entity class.","Ensure serialization/deserialization uses the same entity mapping."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}