hibernate/hibernate-orm · error · StrictJpaComplianceViolation
Encountered non-compliant non-standard function call [listag
Error message
Encountered non-compliant non-standard function call [listagg], but strict JPA compliance was requested; use FUNCTION(functionName[,...]) syntax name instead
What it means
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.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java:4795
private List<SqmTypedNode<?>> getFunctionArguments(HqlParser.GenericFunctionContext ctx) {
if ( ctx.genericFunctionArguments() != null ) {
@SuppressWarnings("unchecked")
final var node = (List<SqmTypedNode<?>>)
ctx.genericFunctionArguments().accept(this);
return node;
}
else if ( ctx.ASTERISK() != null ) {
return singletonList( new SqmStar( getCreationContext().getNodeBuilder() ) );
}
else {
return emptyList();
}
}
@Override
public Object visitListaggFunction(ListaggFunctionContext ctx) {
if ( creationOptions.useStrictJpaCompliance() ) {
throw new StrictJpaComplianceViolation(
"Encountered non-compliant non-standard function call [listagg], but strict JPA " +
"compliance was requested; use FUNCTION(functionName[,...]) " +
"syntax name instead",
StrictJpaComplianceViolation.Type.FUNCTION_CALL
);
}
final SqmFunctionDescriptor functionTemplate = getFunctionDescriptor( "listagg" );
if ( functionTemplate == null ) {
throw new SemanticException( "The listagg() function was not registered for the dialect", query );
}
return applyOverClause(
ctx.overClause(),
functionTemplate.generateOrderedSetAggregateSqmExpression(
getListaggArguments( ctx ),
getFilterExpression( ctx ),
ctx.withinGroupClause() == nullView on GitHub (pinned to fad1729dce)
Solutions
- listagg is non-standard; under strict JPA compliance use FUNCTION('listagg', ...) syntax, or relax strict JPA compliance to allow the native call.
When it happens
Trigger: 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
Common situations: 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.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/01d83f0e9689924f.
Report an issue: GitHub.