{"record":{"id":"62cbebd30be56485","repo":"hibernate/hibernate-orm","slug":"class-classname-not-found-while-looking-fo","errorCode":null,"errorMessage":"class \" + className + \" not found while looking for property: \" + name","messagePattern":"class \" \\+ className \\+ \" not found while looking for property: \" \\+ name","errorType":"exception","errorClass":"MappingException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/internal/util/ReflectHelper.java","lineNumber":235,"sourceCode":"\t *\n\t * @param className The name of the class owning the property.\n\t * @param name The name of the property.\n\t * @param classLoaderService ClassLoader services\n\t *\n\t * @return The type of the property.\n\t *\n\t * @throws MappingException Indicates we were unable to locate the property.\n\t */\n\tpublic static Class<?> reflectedPropertyClass(\n\t\t\tString className,\n\t\t\tString name,\n\t\t\tClassLoaderService classLoaderService) throws MappingException {\n\t\ttry {\n\t\t\tfinal var clazz = classLoaderService.classForName( className );\n\t\t\treturn getter( clazz, name ).getReturnTypeClass();\n\t\t}\n\t\tcatch ( ClassLoadingException e ) {\n\t\t\tthrow new MappingException( \"class \" + className + \" not found while looking for property: \" + name, e );\n\t\t}\n\t}\n\n\tpublic static java.lang.reflect.Type reflectedPropertyType(\n\t\t\tString className,\n\t\t\tString name,\n\t\t\tClassLoaderService classLoaderService) throws MappingException {\n\t\ttry {\n\t\t\tfinal var clazz = classLoaderService.classForName( className );\n\t\t\treturn getter( clazz, name ).getReturnType();\n\t\t}\n\t\tcatch ( ClassLoadingException e ) {\n\t\t\tthrow new MappingException( \"class \" + className + \" not found while looking for property: \" + name, e );\n\t\t}\n\t}\n\n\t/**\n\t * Attempt to resolve the specified property type through reflection.","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/internal/util/ReflectHelper.java#L217-L253","documentation":"Error \"class \" + className + \" not found while looking for property: \" + name\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown at hibernate-core/src/main/java/org/hibernate/internal/util/ReflectHelper.java:235 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the class is on the classpath and the name is correct; fix the entity/property mapping referencing it."],"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"}