hibernate/hibernate-orm · error · IllegalArgumentException
Unrecognized expression type '{}'
Error message
Unrecognized expression type '{}' What it means
Error "Unrecognized expression type '{}'" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/query/restriction/JakartaDataRestriction.java:412
return builder.localDateTime();
}
else if ( expression instanceof NumericCast<?, ?> numericCast ) {
return numericCast( numericCast, root, builder );
}
else if ( expression instanceof TextFunctionExpression<?> function ) {
return textFunction( function, root, builder );
}
else if ( expression instanceof NumericFunctionExpression<?, ?> function ) {
return numericFunction( function, root, builder );
}
else if ( expression instanceof FunctionExpression<?, ?> function ) {
return function( function, root, builder );
}
else if ( expression instanceof NumericOperatorExpression<?, ?> operation ) {
return numericOperation( operation, root, builder );
}
else {
throw new IllegalArgumentException(
"Unrecognized expression type '" + expression.getClass().getName() + "'" );
}
}
/**
* Adapt the given {@linkplain jakarta.data.expression.NavigableExpression Jakarta Data path}
* to a {@linkplain jakarta.persistence.criteria.Path JPA criteria path}.
*/
private static jakarta.persistence.criteria.Path<?> path(NavigableExpression<?, ?> expression, Root<?> root) {
if ( expression instanceof Attribute<?> attribute ) {
return root.get( attribute.name() );
}
else if ( expression instanceof Path<?, ?> path ) {
return path( path.expression(), root ).get( path.attribute().name() );
}
else {
throw new IllegalArgumentException(
"Unrecognized path expression type '" + expression.getClass().getName() + "'" );View on GitHub (pinned to fad1729dce)
Solutions
- The expression type is not recognized in this restriction. Use a supported expression type.
When it happens
Trigger: A Jakarta Data restriction is invalid or unsupported: Unrecognized expression type '<value>'
Common situations: Building Restrictions with empty paths, unsupported restriction/constraint/expression types, or expressions of the wrong Java type.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/ea4e4f1e555dbe3a.
Report an issue: GitHub.