{"record":{"id":"1614efe5048286d2","repo":"hibernate/hibernate-orm","slug":"unable-to-access-attribute-field","errorCode":null,"errorMessage":"Unable to access attribute (field): {}#{}","messagePattern":"Unable to access attribute \\(field\\): (.+?)#(.+?)","errorType":"exception","errorClass":"AttributeExtractionException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/jpa/internal/util/PersistenceUtilHelper.java","lineNumber":260,"sourceCode":"\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tthis.field = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.field = field;\n\t\t}\n\n\t\t@Override\n\t\tpublic Object extractValue(Object owner) {\n\t\t\tif ( field == null ) {\n\t\t\t\tthrow new AttributeExtractionException( \"Attribute (field) \" + name + \" is not accessible\" );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\treturn field.get( owner );\n\t\t\t}\n\t\t\tcatch ( IllegalAccessException e ) {\n\t\t\t\tthrow new AttributeExtractionException(\n\t\t\t\t\t\t\"Unable to access attribute (field): \" + field.getDeclaringClass().getName() + \"#\" + name,\n\t\t\t\t\t\te\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic static class MethodAttributeAccess implements AttributeAccess {\n\t\tprivate final String name;\n\t\tprivate final Method method;\n\n\t\tpublic MethodAttributeAccess(String attributeName, Method method) {\n\t\t\tthis.name = attributeName;\n\t\t\ttry {\n\t\t\t\tReflectHelper.ensureAccessibility( method );\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tthis.method = null;","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/jpa/internal/util/PersistenceUtilHelper.java#L242-L278","documentation":"Error \"Unable to access attribute (field): {}#{}\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown at hibernate-core/src/main/java/org/hibernate/jpa/internal/util/PersistenceUtilHelper.java:260 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the attribute name and declaring class are correct; make the field accessible or use property access."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}