hibernate/hibernate-orm · error · HibernateException
Could not resolve PropertyAccess for attribute `%s#%s`
Error message
Could not resolve PropertyAccess for attribute `%s#%s`
What it means
Error "Could not resolve PropertyAccess for attribute `%s#%s`" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/IdClassRepresentationStrategy.java:73
return RepresentationMode.POJO;
}
@Override
public ReflectionOptimizer getReflectionOptimizer() {
return null;
}
@Override
public JavaType<?> getMappedJavaType() {
return idClassType;
}
@Override
public PropertyAccess resolvePropertyAccess(Property bootAttributeDescriptor) {
final var strategy = bootAttributeDescriptor.getPropertyAccessStrategy( idClassType.getJavaTypeClass() );
if ( strategy == null ) {
throw new HibernateException(
String.format(
Locale.ROOT,
"Could not resolve PropertyAccess for attribute `%s#%s`",
idClassType.getTypeName(),
bootAttributeDescriptor.getName()
)
);
}
return strategy.buildPropertyAccess(
idClassType.getJavaTypeClass(),
bootAttributeDescriptor.getName(),
false
);
}
}
View on GitHub (pinned to fad1729dce)
Solutions
- Ensure the IdClass declares a readable property (field or getter) for the named attribute.
- Check that IdClass attribute names and types match the entity's id attributes exactly.
When it happens
Trigger: Thrown when building the IdClass representation strategy and no PropertyAccess (field or getter/setter) can be resolved for one of the id attributes.
Common situations: See trigger scenarios.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/00caf8728f377e6e.
Report an issue: GitHub.