hibernate/hibernate-orm · error · IllegalArgumentException
Unrecognized path expression type '{}'
Error message
Unrecognized path expression type '{}' What it means
Error "Unrecognized path expression type '{}'" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/query/restriction/JakartaDataRestriction.java:429
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() + "'" );
}
}
/**
* Adapt the given {@linkplain TextFunctionExpression Jakarta Data text function}
* to a {@linkplain Expression JPA criteria expression}.
*/
private static Expression<?> textFunction(
TextFunctionExpression<?> function,
Root<?> root,
CriteriaBuilder builder) {
final var arguments = function.arguments();
return switch ( function.name() ) {
case TextFunctionExpression.LOWER ->
builder.lower( stringExpression( arguments.get( 0 ), root, builder ) );
case TextFunctionExpression.UPPER ->
builder.upper( stringExpression( arguments.get( 0 ), root, builder ) );View on GitHub (pinned to fad1729dce)
Solutions
- The path expression type is not recognized. Use a supported path expression in the restriction.
When it happens
Trigger: A runtime precondition of the Hibernate query API is violated: Unrecognized path expression type '<value>'
Common situations: Application code or configuration calls the query API in a way that violates its documented contract; the interpolated values in the message identify the offending input.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/3609b462828a1a10.
Report an issue: GitHub.