hibernate/hibernate-orm · error · IllegalArgumentException
Unsupported aggregate SQL type: {}
Error message
Unsupported aggregate SQL type: {} What it means
Error "Unsupported aggregate SQL type: {}" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/dialect/aggregate/HANAAggregateSupport.java:210
caseExpression + "'<Collection>'||xmlextract(" + xmlParentPartExpression + columnExpression + "/*')||'</Collection>' end"
);
}
case UUID:
if ( SqlTypes.isBinaryType( column.getJdbcMapping().getJdbcType().getDdlTypeCode() ) ) {
return template.replace(
placeholder,
caseExpression + "hextobin(replace(xmlextractvalue(" + xmlParentPartExpression + columnExpression + "'),'-','')) end"
);
}
// Fall-through intended
default:
return template.replace(
placeholder,
caseExpression + "cast(xmlextractvalue(" + xmlParentPartExpression + columnExpression + "') as " + xmlValueReturningType( column, getCastTypeName( column, typeConfiguration ) ) + ") end"
);
}
}
throw new IllegalArgumentException( "Unsupported aggregate SQL type: " + aggregateColumnTypeCode );
}
private static String determineJsonParentPartExpression(String aggregateParentReadExpression) {
final String parentPartExpression;
if ( aggregateParentReadExpression.startsWith( JSON_QUERY_START ) && aggregateParentReadExpression.endsWith( JSON_QUERY_END ) ) {
parentPartExpression = aggregateParentReadExpression.substring( JSON_QUERY_START.length(), aggregateParentReadExpression.length() - JSON_QUERY_END.length() ) + ".";
}
else {
parentPartExpression = aggregateParentReadExpression + ",'$.";
}
return parentPartExpression;
}
private static String determineXmlParentPartExpression(String aggregateParentReadExpression) {
final String parentPartExpression;
if ( aggregateParentReadExpression.startsWith( XML_EXTRACT_START ) && aggregateParentReadExpression.endsWith( XML_EXTRACT_END ) ) {
parentPartExpression = aggregateParentReadExpression.substring( XML_EXTRACT_START.length(), aggregateParentReadExpression.length() - XML_EXTRACT_END.length() ) + "/";
}View on GitHub (pinned to fad1729dce)
Solutions
- Map the aggregate column with a supported SQL type.
- Avoid the unsupported aggregate type on HANA.
When it happens
Trigger: Triggered when the application calls a Hibernate dialect feature that the configured database dialect cannot provide: Unsupported aggregate SQL type (HANA).
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: Unsupported aggregate SQL type (HANA).
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/d78c8c4af9e16486.
Report an issue: GitHub.