{"record":{"id":"1665b86080bf3736","repo":"hibernate/hibernate-orm","slug":"the-oracle-version-doesn-t-support-json-aggregates","errorCode":null,"errorMessage":"The Oracle version doesn't support JSON aggregates!","messagePattern":"The Oracle version doesn't support JSON aggregates!","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/dialect/aggregate/OracleAggregateSupport.java","lineNumber":273,"sourceCode":"\t\t\t\t\t\t\t\t\t\t\t\tplaceholder,\n\t\t\t\t\t\t\t\t\t\t\t\t\"json_value(\" + parentPartExpression + columnExpression + \"' returning \" + getTypeName( column, typeConfiguration ) + ')'\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcase JSON:\n\t\t\t\t\t\t\tcase JSON_ARRAY:\n\t\t\t\t\t\t\t\treturn template.replace(\n\t\t\t\t\t\t\t\t\t\tplaceholder,\n\t\t\t\t\t\t\t\t\t\t\"json_query(\" + parentPartExpression + columnExpression + \"' returning \" + jsonTypeName + \")\"\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\treturn template.replace(\n\t\t\t\t\t\t\t\t\t\tplaceholder,\n\t\t\t\t\t\t\t\t\t\t\"cast(json_value(\" + parentPartExpression + columnExpression + \"') as \" + getNarrowCastTypeName( column, typeConfiguration ) + ')'\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t}\n\t\t\t\t\tcase NONE:\n\t\t\t\t\t\tthrow new UnsupportedOperationException( \"The Oracle version doesn't support JSON aggregates!\" );\n\t\t\t\t}\n\t\t\tcase SQLXML:\n\t\t\tcase XML_ARRAY:\n\t\t\t\tswitch ( column.getJdbcMapping().getJdbcType().getDefaultSqlTypeCode() ) {\n\t\t\t\t\tcase BIT:\n\t\t\t\t\tcase BOOLEAN:\n\t\t\t\t\t\t//noinspection unchecked\n\t\t\t\t\t\tfinal JdbcLiteralFormatter<Boolean> jdbcLiteralFormatter = (JdbcLiteralFormatter<Boolean>) column.getJdbcMapping().getJdbcType()\n\t\t\t\t\t\t\t\t.getJdbcLiteralFormatter( column.getJdbcMapping().getMappedJavaType() );\n\t\t\t\t\t\tfinal Dialect dialect = typeConfiguration.getCurrentBaseSqlTypeIndicators().getDialect();\n\t\t\t\t\t\tfinal WrapperOptions wrapperOptions = getWrapperOptions( typeConfiguration );\n\t\t\t\t\t\tfinal String trueLiteral = jdbcLiteralFormatter.toJdbcLiteral( true, dialect, wrapperOptions );\n\t\t\t\t\t\tfinal String falseLiteral = jdbcLiteralFormatter.toJdbcLiteral( false, dialect, wrapperOptions );\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\"decode(xmlcast(xmlquery(\" + xmlExtractArguments( aggregateParentReadExpression, columnExpression + \"/text()\" ) + \") as varchar(5)),'true',\" + trueLiteral + \",'false',\" + falseLiteral + \",null)\"\n\t\t\t\t\t\t);\n\t\t\t\t\tcase FLOAT:","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/dialect/aggregate/OracleAggregateSupport.java#L255-L291","documentation":"Error \"The Oracle version doesn't support JSON aggregates!\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Triggered when the application calls a Hibernate dialect feature that the configured database dialect cannot provide: The Oracle version doesn't support JSON aggregates!.","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: The Oracle version doesn't support JSON aggregates!.","solutions":["Upgrade Oracle to a version with JSON support.","Avoid JSON aggregates on this Oracle version."],"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"}