hibernate/hibernate-orm · error · IllegalArgumentException
Unable to find attribute %s -> %s
Error message
Unable to find attribute %s -> %s
What it means
Error "Unable to find attribute %s -> %s" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java:894
}
}
else {
referencedPropertyName = null;
}
if ( referencedPropertyName != null ) {
if ( referencedPropertyName.indexOf( '.' ) > 0 ) {
return interpretNestedToOneKeyDescriptor(
referencedEntityDescriptor,
referencedPropertyName,
attributeMapping,
creationProcess
);
}
final var modelPart = referencedEntityDescriptor.findByPath( referencedPropertyName );
if ( modelPart == null ) {
throw new IllegalArgumentException( "Unable to find attribute " + bootProperty.getPersistentClass()
.getEntityName() + " -> " + bootProperty.getName() );
}
else if ( modelPart instanceof ToOneAttributeMapping toOneAttributeMapping ) {
setReferencedAttributeForeignKeyDescriptor(
attributeMapping,
toOneAttributeMapping,
referencedEntityDescriptor,
referencedPropertyName,
creationProcess
);
}
else if ( modelPart instanceof EmbeddableValuedModelPart embeddableValuedModelPart ) {
final var embeddedForeignKeyDescriptor = buildEmbeddableForeignKeyDescriptor(
getPropertyPath( attributeMapping.getNavigableRole() ),
embeddableValuedModelPart,
bootValueMapping,
attributeMapping.getDeclaringType(),
attributeMapping.findContainingEntityMapping(),View on GitHub (pinned to fad1729dce)
Solutions
- Verify the referenced attribute path exists on the target entity/embeddable; fix the referencedPropertyName or mappedBy value.
When it happens
Trigger: Thrown when a referenced attribute cannot be found on the target embeddable or entity while building a foreign key mapping.
Common situations: See trigger scenarios.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/f6d59fc56d09b276.
Report an issue: GitHub.