{"record":{"id":"b7913c7ad76faecc","repo":"hibernate/hibernate-orm","slug":"transforming-xml-array-to-native-arrays-is-not-sup","errorCode":null,"errorMessage":"Transforming XML_ARRAY to native arrays is not supported on Oracle!","messagePattern":"Transforming XML_ARRAY to native arrays is not supported on Oracle!","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/dialect/aggregate/OracleAggregateSupport.java","lineNumber":322,"sourceCode":"\t\t\t\t\t\t);\n\t\t\t\t\tcase TIME:\n\t\t\t\t\t\treturn template.replace(\n\t\t\t\t\t\t\t\tplaceholder,\n\t\t\t\t\t\t\t\t\"to_timestamp(xmlcast(xmlquery(\" + xmlExtractArguments( aggregateParentReadExpression, columnExpression + \"/text()\" ) + \") as varchar(35)),'hh24:mi:ss')\"\n\t\t\t\t\t\t);\n\t\t\t\t\tcase TIMESTAMP:\n\t\t\t\t\t\treturn template.replace(\n\t\t\t\t\t\t\t\tplaceholder,\n\t\t\t\t\t\t\t\t\"to_timestamp(xmlcast(xmlquery(\" + xmlExtractArguments( aggregateParentReadExpression, columnExpression + \"/text()\" ) + \") as varchar(35)),'YYYY-MM-DD\\\"T\\\"hh24:mi:ss.FF9')\"\n\t\t\t\t\t\t);\n\t\t\t\t\tcase TIMESTAMP_WITH_TIMEZONE:\n\t\t\t\t\tcase TIMESTAMP_UTC:\n\t\t\t\t\t\treturn template.replace(\n\t\t\t\t\t\t\t\tplaceholder,\n\t\t\t\t\t\t\t\t\"to_timestamp_tz(xmlcast(xmlquery(\" + xmlExtractArguments( aggregateParentReadExpression, columnExpression + \"/text()\" ) + \") as varchar(35)),'YYYY-MM-DD\\\"T\\\"hh24:mi:ss.FF9TZH:TZM')\"\n\t\t\t\t\t\t);\n\t\t\t\t\tcase ARRAY:\n\t\t\t\t\t\tthrow new UnsupportedOperationException( \"Transforming XML_ARRAY to native arrays is not supported on Oracle!\" );\n\t\t\t\t\tcase SQLXML:\n\t\t\t\t\t\treturn template.replace(\n\t\t\t\t\t\t\t\tplaceholder,\n\t\t\t\t\t\t\t\tXML_EXTRACT_START + xmlExtractArguments( aggregateParentReadExpression, columnExpression + \"/*\" ) + \"))\"\n\t\t\t\t\t\t);\n\t\t\t\t\tcase XML_ARRAY:\n\t\t\t\t\t\tif ( typeConfiguration.getCurrentBaseSqlTypeIndicators().isXmlFormatMapperLegacyFormatEnabled() ) {\n\t\t\t\t\t\t\tthrow new IllegalArgumentException( \"XML array '\" + columnExpression + \"' in '\" + aggregateParentReadExpression + \"' is not supported with legacy format enabled.\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\treturn template.replace(\n\t\t\t\t\t\t\t\t\tplaceholder,\n\t\t\t\t\t\t\t\t\t\"xmlelement(\\\"Collection\\\",xmlquery(\" + xmlExtractArguments( aggregateParentReadExpression, columnExpression + \"/*\" ) + \"))\"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\tcase UUID:\n\t\t\t\t\t\tif ( SqlTypes.isBinaryType( column.getJdbcMapping().getJdbcType().getDdlTypeCode() ) ) {\n\t\t\t\t\t\t\treturn template.replace(","sourceCodeStart":304,"sourceCodeEnd":340,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/dialect/aggregate/OracleAggregateSupport.java#L304-L340","documentation":"Error \"Transforming XML_ARRAY to native arrays is not supported on Oracle!\" thrown in hibernate/hibernate-orm.","triggerScenarios":"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!.","commonSituations":"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!.","solutions":["Map the collection as XML instead of a native array.","Use a database that supports native arrays for XML_ARRAY."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}