hibernate/hibernate-orm · error · IllegalArgumentException

"XML array '" + columnExpression + "' in '" + aggregateParen

Error message

"XML array '" + columnExpression + "' in '" + aggregateParentReadExpression + "' is not supported with legacy format enabled."

What it means

Error ""XML array '" + columnExpression + "' in '" + aggregateParentReadExpression + "' is not supported with legacy format enabled."" thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/dialect/aggregate/HANAAggregateSupport.java:187

								caseExpression + "hextobin(xmlextractvalue(" + xmlParentPartExpression + columnExpression + "')) end"
						);
					case DATE:
					case TIME:
					case TIMESTAMP:
					case TIMESTAMP_UTC:
						// Cast from clob to varchar first
						return template.replace(
								placeholder,
								caseExpression + "cast(cast(xmlextractvalue(" + xmlParentPartExpression + columnExpression + "') as varchar(36)) as " + xmlValueReturningType( column, getCastTypeName( column, typeConfiguration ) ) + ") end"
						);
					case SQLXML:
						return template.replace(
								placeholder,
								caseExpression + XML_EXTRACT_READ_INVOCATION_START + xmlParentPartExpression + columnExpression + XML_EXTRACT_READ_END
						);
					case XML_ARRAY:
						if ( typeConfiguration.getCurrentBaseSqlTypeIndicators().isXmlFormatMapperLegacyFormatEnabled() ) {
							throw new IllegalArgumentException( "XML array '" + columnExpression + "' in '" + aggregateParentReadExpression + "' is not supported with legacy format enabled." );
						}
						else {
							return template.replace(
									placeholder,
									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,

View on GitHub (pinned to fad1729dce)

Solutions

  1. Disable legacy XML format.
  2. Avoid XML array aggregates on HANA.

When it happens

Trigger: Triggered when the application calls a Hibernate dialect feature that the configured database dialect cannot provide: XML array is not supported with legacy format enabled (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: XML array is not supported with legacy format enabled (HANA).


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