{"record":{"id":"3486a6b6e0e4ed6d","repo":"hibernate/hibernate-orm","slug":"could-not-locate-getter-for-property-named-co-3486a6","errorCode":null,"errorMessage":"Could not locate getter for property named [\" + containerJavaType.getName() + \"#\" + propertyName + \"]","messagePattern":"Could not locate getter for property named \\[\" \\+ containerJavaType\\.getName\\(\\) \\+ \"#\" \\+ propertyName \\+ \"\\]","errorType":"exception","errorClass":"PropertyAccessBuildingException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessMixedImpl.java","lineNumber":58,"sourceCode":"\t\tthis.strategy = strategy;\n\n\t\tfinal var propertyAccessType = getAccessType( containerJavaType, propertyName );\n\t\tswitch ( propertyAccessType ) {\n\t\t\tcase FIELD: {\n\t\t\t\tfinal var field = fieldOrNull( containerJavaType, propertyName );\n\t\t\t\tif ( field == null ) {\n\t\t\t\t\tthrow new PropertyAccessBuildingException(\n\t\t\t\t\t\t\t\"Could not locate field for property named [\" + containerJavaType.getName() + \"#\" + propertyName + \"]\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tgetter = fieldGetter( containerJavaType, propertyName, field );\n\t\t\t\tsetter = fieldSetter( containerJavaType, propertyName, field );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase PROPERTY: {\n\t\t\t\tfinal var getterMethod = getterMethodOrNull( containerJavaType, propertyName );\n\t\t\t\tif ( getterMethod == null ) {\n\t\t\t\t\tthrow new PropertyAccessBuildingException(\n\t\t\t\t\t\t\t\"Could not locate getter for property named [\" + containerJavaType.getName() + \"#\" + propertyName + \"]\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tfinal var setterMethod = findSetterMethod( containerJavaType, propertyName, getterMethod.getReturnType() );\n\n\t\t\t\tgetter = propertyGetter( containerJavaType, propertyName, getterMethod );\n\t\t\t\tsetter = propertySetter( containerJavaType, propertyName, setterMethod );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tthrow new PropertyAccessBuildingException(\n\t\t\t\t\t\t\"Invalid access type \" + propertyAccessType + \" for property named [\" + containerJavaType.getName() + \"#\" + propertyName + \"]\"\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t// --- //","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessMixedImpl.java#L40-L76","documentation":"Error \"Could not locate getter for property named [\" + containerJavaType.getName() + \"#\" + propertyName + \"]\" thrown in hibernate/hibernate-orm.","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":["Add a JavaBean getter (getX/isX) for the mapped property.","Fix the property name in the mapping to match an existing getter."],"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"}