{"record":{"id":"ad39b6140d1760f1","repo":"hibernate/hibernate-orm","slug":"invalid-access-type-propertyaccesstype-for-ad39b6","errorCode":null,"errorMessage":"Invalid access type \" + propertyAccessType + \" for property named [\" + containerJavaType.getName() + \"#\" + propertyName + \"]","messagePattern":"Invalid access type \" \\+ propertyAccessType \\+ \" 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/PropertyAccessGetterImpl.java","lineNumber":59,"sourceCode":"\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\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\tgetter = propertyGetter( containerJavaType, propertyName, getterMethod );\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// --- //\n\n\tprivate static Getter fieldGetter(Class<?> containerJavaType, String propertyName, Field field) {\n\t\treturn new GetterFieldImpl( containerJavaType, propertyName, field );\n\t}\n\n\tprivate static Getter propertyGetter(Class<?> containerJavaType, String propertyName, Method method) {\n\t\treturn new GetterMethodImpl( containerJavaType, propertyName, method );\n\t}\n\n\t@Override\n\tpublic PropertyAccessStrategy getPropertyAccessStrategy() {","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessGetterImpl.java#L41-L77","documentation":"Error \"Invalid access type \" + propertyAccessType + \" for property named [\" + containerJavaType.getName() + \"#\" + propertyName + \"]\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A runtime precondition of the Hibernate API is violated.","commonSituations":"Occurs when application code or configuration does not satisfy the documented contract of the API being called.","solutions":["Set the property access type to 'field' or 'property' consistently in the mapping/annotations.","Place @Access(AccessType.FIELD) or PROPERTY at the correct level for the attribute."],"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"}