hibernate/hibernate-orm · error · HibernateException

Unable to create instance from incoming ClassDetails - %s

Error message

Unable to create instance from incoming ClassDetails - %s

What it means

Error "Unable to create instance from incoming ClassDetails - %s" thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/DynamicModelHelper.java:748

	}

	private static TypeDetails resolveCollectionType(Class<?> collectionType, XmlDocumentContext xmlDocumentContext) {
		final var classDetails = xmlDocumentContext
				.getBootstrapContext()
				.getModelsContext()
				.getClassDetailsRegistry()
				.resolveClassDetails( collectionType.getName() );
		return new ClassTypeDetailsImpl( classDetails, TypeDetails.Kind.CLASS );
	}

	@Nonnull
	private static <T> T createInstance(ClassDetails classDetails) {
		try {
			//noinspection unchecked
			return (T) classDetails.toJavaClass().getConstructor().newInstance();
		}
		catch (Exception e) {
			throw new HibernateException( "Unable to create instance from incoming ClassDetails - " + classDetails );
		}
	}
}

View on GitHub (pinned to fad1729dce)

Solutions

  1. Check the named class exists on the classpath and has an accessible constructor; inspect the wrapped cause for details.

Example fix

Check the named class exists on the classpath and has an accessible constructor; inspect the wrapped cause for details.

When it happens

Trigger: An hbm.xml / orm.xml mapping document violates a mapping rule during bootstrap.

Common situations: Legacy XML mappings with invalid combinations (column+formula, mixed inheritance, missing identifiers, bad extends references).


AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22). Data as JSON: /api/errors/b475b415e3c5dafa. Report an issue: GitHub.