{"record":{"id":"ff1465adefb52ffd","repo":"hibernate/hibernate-orm","slug":"could-not-locate-field-for-property-named-con-ff1465","errorCode":null,"errorMessage":"Could not locate field for property named [\" + containerJavaType.getName() + \"#\" + propertyName + \"]","messagePattern":"Could not locate field 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":47,"sourceCode":" *\n * @author Steve Ebersole\n */\npublic class PropertyAccessMixedImpl implements PropertyAccess {\n\tprivate final PropertyAccessStrategy strategy;\n\n\tprivate final Getter getter;\n\t@Nullable\n\tprivate final Setter setter;\n\n\tpublic PropertyAccessMixedImpl(PropertyAccessStrategy strategy, Class<?> containerJavaType, String propertyName) {\n\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 );","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessMixedImpl.java#L29-L65","documentation":"Error \"Could not locate field 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":["Declare a field with the mapped property name on the class (or its hierarchy).","Fix the property name in the mapping to match an existing field."],"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"}