hibernate/hibernate-orm · error · TransformationException

Error processing entity attributes

Error message

Error processing entity attributes : {}

What it means

Catch-all wrapper around transferBaseEntityAttributes: any exception thrown while transferring an hbm entity's attribute set into the new mapping model is rethrown with the entity name for context. The root cause (in the cause chain) is the actual attribute-processing failure.

Solutions

  1. Check the wrapped exception for the specific attribute of the entity that failed transformation.
  2. Validate the hbm.xml entity definition against the expected attributes (id, property, associations) before transforming.
  3. Simplify or correct the offending attribute mapping and re-run the transformation.
Defensive patterns

Strategy: try-catch

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/08342b9d0dcd50d9. Report an issue: GitHub.

Appendix: source

Thrown at hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/transform/HbmXmlTransformer.java:2117

			// if we can't load the class, skip transient generation
		}
	}

	private void transferBaseEntityAttributes(
			EntityInfo hbmEntity,
			JaxbEntityImpl mappingEntity,
			EntityTypeInfo entityTypeInfo) {
		try {
			mappingEntity.setAttributes( new JaxbAttributesContainerImpl() );
			transferBaseAttributes(
					entityTypeInfo.getPersistentClass().getEntityName(),
					hbmEntity.getAttributes(),
					entityTypeInfo,
					mappingEntity.getAttributes()
			);
		}
		catch (Exception e) {
			throw new TransformationException( "Error processing entity attributes : " + entityTypeInfo.getPersistentClass().getEntityName(), e, origin() );
		}
	}

	private void transferBaseAttributes(
			String roleBase,
			List<?> hbmAttributeMappings,
			ManagedTypeInfo managedTypeInfo,
			JaxbAttributesContainer attributes) {
		for ( Object hbmAttributeMapping : hbmAttributeMappings ) {
			if ( hbmAttributeMapping instanceof JaxbHbmBasicAttributeType basic ) {
				try {
					final var propertyInfo = managedTypeInfo.propertyInfoMap().get( basic.getName() );
					attributes.getBasicAttributes().add( transformBasicAttribute( basic, propertyInfo ) );
				}
				catch (Exception e) {
					throw new TransformationException( "Error transforming <property/> : " + basic.getName(), e, origin() );
				}
			}

View on GitHub (pinned to fad1729dce)