hibernate/hibernate-orm · error · PropertyAccessException
IllegalArgumentException occurred calling
Error message
IllegalArgumentException occurred calling
What it means
Wraps IllegalArgumentException from Method.invoke while reading a property getter, logged first via CORE_LOGGER.illegalPropertyGetterArgument: the invocation arguments did not match the method signature (wrong instance type for the getter's owner). Inspect the cause; this usually indicates a mismatched owner object passed to the getter.
Solutions
- Ensure the getter is invoked on an instance of the correct declaring class.
- Check for proxy/subclass mismatches between the mapped class and the runtime object.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: A runtime precondition of the Hibernate API is violated.
Common situations: Occurs when application code or configuration does not satisfy the documented contract of the API being called.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/cb77eb70ad3d328a.
Report an issue: GitHub.
Appendix: source
Thrown at hibernate-core/src/main/java/org/hibernate/property/access/spi/GetterMethodImpl.java:69
"Exception occurred inside",
false,
containerClass,
propertyName
);
}
catch (IllegalAccessException iae) {
throw new PropertyAccessException(
iae,
"IllegalAccessException occurred while calling",
false,
containerClass,
propertyName
);
//cannot occur
}
catch (IllegalArgumentException iae) {
CORE_LOGGER.illegalPropertyGetterArgument( containerClass.getName(), propertyName );
throw new PropertyAccessException(
iae,
"IllegalArgumentException occurred calling",
false,
containerClass,
propertyName
);
}
}
@Override
public @Nullable Object getForInsert(Object owner, Map<Object, Object> mergeMap, SharedSessionContractImplementor session) {
return get( owner );
}
@Override
public Class<?> getReturnTypeClass() {
return getterMethod.getReturnType();
}View on GitHub (pinned to fad1729dce)