hibernate/hibernate-orm · error · TransformationException
Error transforming <component/> : {}
Error message
Error transforming <component/> : {} What it means
Error "Error transforming <component/> : {}" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/transform/HbmXmlTransformer.java:2154
else if ( hbmAttributeMapping instanceof JaxbHbmCompositeAttributeType hbmComponent ) {
try {
final String componentRole = roleBase + "." + hbmComponent.getName();
final var componentTypeInfo = transformationState.getEmbeddableInfoByRole().get( componentRole );
final var jaxbEmbeddable = componentHandler.applyEmbeddable(
roleBase,
hbmComponent,
componentTypeInfo
);
final var embedded = componentHandler.transformEmbedded( jaxbEmbeddable, hbmComponent, componentTypeInfo );
transferAccess(
hbmComponent.getAccess(),
embedded::setAccess,
embedded::setAttributeAccessor
);
attributes.getEmbeddedAttributes().add( embedded );
}
catch (Exception e) {
throw new TransformationException( "Error transforming <component/> : " + hbmComponent.getName(), e, origin() );
}
}
else if ( hbmAttributeMapping instanceof JaxbHbmPropertiesType hbmProperties ) {
// while we could simply "unwrap" the <properties/> itself and inline the attributes,
// <properties/> is most often used to create a target for property-ref mappings - that
// we could not support without a new sort of annotation - e.g.
//
// @interface PropertyGroup {
// String name();
// String[] propertyNames();
// }
//
// where the `name` could then be used for `@PropertyRef`
handleUnsupported( "<properties/> mappings not supported for transformation [name=%s]", hbmProperties.getName() );
}
else if ( hbmAttributeMapping instanceof JaxbHbmDynamicComponentType dynamicComponentType) {
final String name = dynamicComponentType.getName();
handleUnsupported(View on GitHub (pinned to fad1729dce)
Solutions
- Inspect the reported <component/> element for malformed nested properties or unsupported attributes.
- Check the component's class name and nested element definitions in the hbm.xml.
- Review the causal exception to identify the exact component attribute that failed transformation.
When it happens
Trigger: The hbm.xml to mapping.xml transformer hits an unexpected structure.
Common situations: Converting legacy hbm.xml documents containing constructs the transformer does not handle.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/545a2184da1cc470.
Report an issue: GitHub.