{"record":{"id":"01d83f0e9689924f","repo":"hibernate/hibernate-orm","slug":"encountered-non-compliant-non-standard-function-ca-01d83f","errorCode":null,"errorMessage":"Encountered non-compliant non-standard function call [listagg], but strict JPA compliance was requested; use FUNCTION(functionName[,...]) syntax name instead","messagePattern":"Encountered non-compliant non-standard function call \\[listagg\\], but strict JPA compliance was requested; use FUNCTION\\(functionName\\[,\\.\\.\\.\\]\\) syntax name instead","errorType":"exception","errorClass":"StrictJpaComplianceViolation","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java","lineNumber":4795,"sourceCode":"\tprivate List<SqmTypedNode<?>> getFunctionArguments(HqlParser.GenericFunctionContext ctx) {\n\t\tif ( ctx.genericFunctionArguments() != null ) {\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tfinal var node = (List<SqmTypedNode<?>>)\n\t\t\t\t\tctx.genericFunctionArguments().accept(this);\n\t\t\treturn node;\n\t\t}\n\t\telse if ( ctx.ASTERISK() != null ) {\n\t\t\treturn singletonList( new SqmStar( getCreationContext().getNodeBuilder() ) );\n\t\t}\n\t\telse {\n\t\t\treturn emptyList();\n\t\t}\n\t}\n\n\t@Override\n\tpublic Object visitListaggFunction(ListaggFunctionContext ctx) {\n\t\tif ( creationOptions.useStrictJpaCompliance() ) {\n\t\t\tthrow new StrictJpaComplianceViolation(\n\t\t\t\t\t\"Encountered non-compliant non-standard function call [listagg], but strict JPA \" +\n\t\t\t\t\t\t\t\"compliance was requested; use FUNCTION(functionName[,...]) \" +\n\t\t\t\t\t\t\t\"syntax name instead\",\n\t\t\t\t\tStrictJpaComplianceViolation.Type.FUNCTION_CALL\n\t\t\t);\n\t\t}\n\n\t\tfinal SqmFunctionDescriptor functionTemplate = getFunctionDescriptor( \"listagg\" );\n\t\tif ( functionTemplate == null ) {\n\t\t\tthrow new SemanticException( \"The listagg() function was not registered for the dialect\", query );\n\t\t}\n\n\t\treturn applyOverClause(\n\t\t\t\tctx.overClause(),\n\t\t\t\tfunctionTemplate.generateOrderedSetAggregateSqmExpression(\n\t\t\t\t\t\tgetListaggArguments( ctx ),\n\t\t\t\t\t\tgetFilterExpression( ctx ),\n\t\t\t\t\t\tctx.withinGroupClause() == null","sourceCodeStart":4777,"sourceCodeEnd":4813,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java#L4777-L4813","documentation":"Error \"Encountered non-compliant non-standard function call [listagg], but strict JPA compliance was requested; use FUNCTION(functionName[,...]) syntax name instead\" thrown in hibernate/hibernate-orm.","triggerScenarios":"An HQL-specific construct is used while strict JPQL compliance is enabled: Encountered non-compliant non-standard function call [listagg], but strict JPA compliance was requested; use FUNCTION(functionName[,...]) syntax name instead","commonSituations":"Applications running with hibernate.jpa.compliance.query=true (or JPA-compliance mode) that submit queries using Hibernate extensions such as collations, tuples/row value constructors, HQL collection functions (maxelement/elements/indices), value()/key() on non-Map types, or non-standard function calls without FUNCTION() syntax.","solutions":["listagg is non-standard; under strict JPA compliance use FUNCTION('listagg', ...) syntax, or relax strict JPA compliance to allow the native call."],"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"}