hibernate/hibernate-orm · error · MappingException
class " + className + " not found while looking for…
Error message
class " + className + " not found while looking for property: " + name
What it means
Wraps a ClassLoadingException raised while reflecting on a mapped class's property: the class named in the mapping could not be loaded, so the property type cannot be determined. The original failure is chained.
Solutions
- Ensure the class is on the classpath and the name is correct; fix the entity/property mapping referencing it.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at hibernate-core/src/main/java/org/hibernate/internal/util/ReflectHelper.java:235 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/62cbebd30be56485.
Report an issue: GitHub.
Appendix: source
Thrown at hibernate-core/src/main/java/org/hibernate/internal/util/ReflectHelper.java:235
*
* @param className The name of the class owning the property.
* @param name The name of the property.
* @param classLoaderService ClassLoader services
*
* @return The type of the property.
*
* @throws MappingException Indicates we were unable to locate the property.
*/
public static Class<?> reflectedPropertyClass(
String className,
String name,
ClassLoaderService classLoaderService) throws MappingException {
try {
final var clazz = classLoaderService.classForName( className );
return getter( clazz, name ).getReturnTypeClass();
}
catch ( ClassLoadingException e ) {
throw new MappingException( "class " + className + " not found while looking for property: " + name, e );
}
}
public static java.lang.reflect.Type reflectedPropertyType(
String className,
String name,
ClassLoaderService classLoaderService) throws MappingException {
try {
final var clazz = classLoaderService.classForName( className );
return getter( clazz, name ).getReturnType();
}
catch ( ClassLoadingException e ) {
throw new MappingException( "class " + className + " not found while looking for property: " + name, e );
}
}
/**
* Attempt to resolve the specified property type through reflection.View on GitHub (pinned to fad1729dce)