hibernate/hibernate-orm · error · MappingException

class " + className + " not found while looking for property

Error message

class " + className + " not found while looking for property: " + name

What it means

Error "class " + className + " not found while looking for property: " + name" thrown in hibernate/hibernate-orm.

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)

Solutions

  1. Ensure the class is on the classpath and the name is correct; fix the entity/property mapping referencing it.

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.