hibernate/hibernate-orm · error · UnsupportedOperationException
Transforming XML_ARRAY to native arrays is not supported on
Error message
Transforming XML_ARRAY to native arrays is not supported on Oracle!
What it means
Error "Transforming XML_ARRAY to native arrays is not supported on Oracle!" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/dialect/aggregate/OracleAggregateSupport.java:322
);
case TIME:
return template.replace(
placeholder,
"to_timestamp(xmlcast(xmlquery(" + xmlExtractArguments( aggregateParentReadExpression, columnExpression + "/text()" ) + ") as varchar(35)),'hh24:mi:ss')"
);
case TIMESTAMP:
return template.replace(
placeholder,
"to_timestamp(xmlcast(xmlquery(" + xmlExtractArguments( aggregateParentReadExpression, columnExpression + "/text()" ) + ") as varchar(35)),'YYYY-MM-DD\"T\"hh24:mi:ss.FF9')"
);
case TIMESTAMP_WITH_TIMEZONE:
case TIMESTAMP_UTC:
return template.replace(
placeholder,
"to_timestamp_tz(xmlcast(xmlquery(" + xmlExtractArguments( aggregateParentReadExpression, columnExpression + "/text()" ) + ") as varchar(35)),'YYYY-MM-DD\"T\"hh24:mi:ss.FF9TZH:TZM')"
);
case ARRAY:
throw new UnsupportedOperationException( "Transforming XML_ARRAY to native arrays is not supported on Oracle!" );
case SQLXML:
return template.replace(
placeholder,
XML_EXTRACT_START + xmlExtractArguments( aggregateParentReadExpression, columnExpression + "/*" ) + "))"
);
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,
"xmlelement(\"Collection\",xmlquery(" + xmlExtractArguments( aggregateParentReadExpression, columnExpression + "/*" ) + "))"
);
}
case UUID:
if ( SqlTypes.isBinaryType( column.getJdbcMapping().getJdbcType().getDdlTypeCode() ) ) {
return template.replace(View on GitHub (pinned to fad1729dce)
Solutions
- Map the collection as XML instead of a native array.
- Use a database that supports native arrays for XML_ARRAY.
When it happens
Trigger: Triggered when the application calls a Hibernate dialect feature that the configured database dialect cannot provide: Transforming XML_ARRAY to native arrays is not supported on Oracle!.
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: Transforming XML_ARRAY to native arrays is not supported on Oracle!.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/b7913c7ad76faecc.
Report an issue: GitHub.