hibernate/hibernate-orm · error · UnsupportedOperationException

"Dialect does not support aggregateComponentCustomReadExpres

Error message

"Dialect does not support aggregateComponentCustomReadExpression: " + getClass().getName()

What it means

Error ""Dialect does not support aggregateComponentCustomReadExpression: " + getClass().getName()" thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/dialect/aggregate/AggregateSupportImpl.java:37

import static org.hibernate.type.SqlTypes.JSON;
import static org.hibernate.type.SqlTypes.JSON_ARRAY;
import static org.hibernate.type.SqlTypes.SQLXML;
import static org.hibernate.type.SqlTypes.XML_ARRAY;

public class AggregateSupportImpl implements AggregateSupport {

	public static final AggregateSupport INSTANCE = new AggregateSupportImpl();

	@Override
	public String aggregateComponentCustomReadExpression(
			String template,
			String placeholder,
			String aggregateParentReadExpression,
			String columnExpression,
			int aggregateColumnTypeCode,
			SqlTypedMapping column,
			TypeConfiguration typeConfiguration) {
		throw new UnsupportedOperationException( "Dialect does not support aggregateComponentCustomReadExpression: " + getClass().getName() );
	}

	@Override
	public String aggregateComponentAssignmentExpression(
			String aggregateParentAssignmentExpression,
			String columnExpression,
			int aggregateColumnTypeCode,
			Column column) {
		throw new UnsupportedOperationException( "Dialect does not support aggregateComponentAssignmentExpression: " + getClass().getName() );
	}

	@Override
	public String aggregateCustomWriteExpression(
			AggregateColumn aggregateColumn,
			List<Column> aggregatedColumns) {
		return null;
	}

View on GitHub (pinned to fad1729dce)

Solutions

  1. Use a dialect with aggregate support (e.g. PostgreSQL for JSON/Struct).
  2. Map the component as a plain embeddable instead of an aggregate type.

When it happens

Trigger: Triggered when the application calls a Hibernate dialect feature that the configured database dialect cannot provide: Dialect does not support aggregateComponentCustomReadExpression.

Common situations: Common when running against a database whose dialect lacks this capability, when a mapping or HQL/Criteria query requests unsupported functionality, or when the wrong dialect is configured for the database in use. Error: Dialect does not support aggregateComponentCustomReadExpression.


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