{"record":{"id":"55e50a95bf3ba0e0","repo":"hibernate/hibernate-orm","slug":"json-path-jsonpath-uses-parameter-parametern-55e50a","errorCode":null,"errorMessage":"JSON path [{jsonPath}] uses parameter [{parameterName}] that is not passed","messagePattern":"JSON path \\[(.+?)\\] uses parameter \\[(.+?)\\] that is not passed","errorType":"exception","errorClass":"QueryException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/dialect/function/json/PostgreSQLJsonRemoveFunction.java","lineNumber":56,"sourceCode":"\t\t\tsqlAppender.appendSql( \"cast(\" );\n\t\t}\n\t\tjson.accept( translator );\n\t\tif ( needsCast ) {\n\t\t\tsqlAppender.appendSql( \" as jsonb)\" );\n\t\t}\n\t\tsqlAppender.appendSql( \"#-\" );\n\t\tList<JsonPathHelper.JsonPathElement> jsonPathElements =\n\t\t\t\tJsonPathHelper.parseJsonPathElements( translator.getLiteralValue( jsonPath ) );\n\t\tsqlAppender.appendSql( \"array\" );\n\t\tchar separator = '[';\n\t\tfor ( JsonPathHelper.JsonPathElement pathElement : jsonPathElements ) {\n\t\t\tsqlAppender.appendSql( separator );\n\t\t\tif ( pathElement instanceof JsonPathHelper.JsonAttribute attribute ) {\n\t\t\t\tsqlAppender.appendSingleQuoteEscapedString( attribute.attribute() );\n\t\t\t}\n\t\t\telse if ( pathElement instanceof JsonPathHelper.JsonParameterIndexAccess parameterIndexAccess ) {\n\t\t\t\tfinal String parameterName = parameterIndexAccess.parameterName();\n\t\t\t\tthrow new QueryException( \"JSON path [\" + jsonPath + \"] uses parameter [\" + parameterName + \"] that is not passed\" );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsqlAppender.appendSql( '\\'' );\n\t\t\t\tsqlAppender.appendSql( ( (JsonPathHelper.JsonIndexAccess) pathElement ).index() );\n\t\t\t\tsqlAppender.appendSql( '\\'' );\n\t\t\t}\n\t\t\tseparator = ',';\n\t\t}\n\t\tsqlAppender.appendSql( \"]::text[]\" );\n\t}\n\n\tprivate boolean isJsonType(Expression expression) {\n\t\tfinal JdbcMappingContainer expressionType = expression.getExpressionType();\n\t\treturn expressionType != null && expressionType.getSingleJdbcMapping().getJdbcType().isJson();\n\t}\n}\n","sourceCodeStart":38,"sourceCodeEnd":73,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/dialect/function/json/PostgreSQLJsonRemoveFunction.java#L38-L73","documentation":"Error \"JSON path [{jsonPath}] uses parameter [{parameterName}] that is not passed\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Triggered when the application calls a Hibernate dialect feature that the configured database dialect cannot provide: JSON path uses a parameter that is not passed (PostgreSQL json_remove).","commonSituations":"Common when running against a database whose dialect lacks this capability, when a mapping or HQL/Criteria query requests unsupported functionality, or when the wrong dialect is configured for the database in use. Error: JSON path uses a parameter that is not passed (PostgreSQL json_remove).","solutions":["Add the missing parameter to the PASSING clause.","Fix the parameter name in the JSON path."],"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"}