{"record":{"id":"ea4e4f1e555dbe3a","repo":"hibernate/hibernate-orm","slug":"unrecognized-expression-type","errorCode":null,"errorMessage":"Unrecognized expression type '{}'","messagePattern":"Unrecognized expression type '(.+?)'","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/restriction/JakartaDataRestriction.java","lineNumber":412,"sourceCode":"\t\t\treturn builder.localDateTime();\n\t\t}\n\t\telse if ( expression instanceof NumericCast<?, ?> numericCast ) {\n\t\t\treturn numericCast( numericCast, root, builder );\n\t\t}\n\t\telse if ( expression instanceof TextFunctionExpression<?> function ) {\n\t\t\treturn textFunction( function, root, builder );\n\t\t}\n\t\telse if ( expression instanceof NumericFunctionExpression<?, ?> function ) {\n\t\t\treturn numericFunction( function, root, builder );\n\t\t}\n\t\telse if ( expression instanceof FunctionExpression<?, ?> function ) {\n\t\t\treturn function( function, root, builder );\n\t\t}\n\t\telse if ( expression instanceof NumericOperatorExpression<?, ?> operation ) {\n\t\t\treturn numericOperation( operation, root, builder );\n\t\t}\n\t\telse {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Unrecognized expression type '\" + expression.getClass().getName() + \"'\" );\n\t\t}\n\t}\n\n\t/**\n\t * Adapt the given {@linkplain jakarta.data.expression.NavigableExpression Jakarta Data path}\n\t * to a {@linkplain jakarta.persistence.criteria.Path JPA criteria path}.\n\t */\n\tprivate static jakarta.persistence.criteria.Path<?> path(NavigableExpression<?, ?> expression, Root<?> root) {\n\t\tif ( expression instanceof Attribute<?> attribute ) {\n\t\t\treturn root.get( attribute.name() );\n\t\t}\n\t\telse if ( expression instanceof Path<?, ?> path ) {\n\t\t\treturn path( path.expression(), root ).get( path.attribute().name() );\n\t\t}\n\t\telse {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Unrecognized path expression type '\" + expression.getClass().getName() + \"'\" );","sourceCodeStart":394,"sourceCodeEnd":430,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/restriction/JakartaDataRestriction.java#L394-L430","documentation":"Error \"Unrecognized expression type '{}'\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A Jakarta Data restriction is invalid or unsupported: Unrecognized expression type '<value>'","commonSituations":"Building Restrictions with empty paths, unsupported restriction/constraint/expression types, or expressions of the wrong Java type.","solutions":["The expression type is not recognized in this restriction. Use a supported expression type."],"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"}