{"record":{"id":"a555cf9a2a5e30c7","repo":"hibernate/hibernate-orm","slug":"json-path-jsonpath-uses-parameter-paramete","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/PostgreSQLJsonSetFunction.java","lineNumber":59,"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\tif ( value instanceof Literal literal && literal.getLiteralValue() == null ) {\n\t\t\tsqlAppender.appendSql( \"null::jsonb\" );\n\t\t}\n\t\telse {\n\t\t\tsqlAppender.appendSql( \"to_jsonb(\" );\n\t\t\tvalue.accept( translator );\n\t\t\tif ( value instanceof Literal literal && literal.getJdbcMapping().getJdbcType().isString() ) {\n\t\t\t\t// PostgreSQL until version 16 is not smart enough to infer the type of a string literal\n\t\t\t\tsqlAppender.appendSql( \"::text\" );","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/dialect/function/json/PostgreSQLJsonSetFunction.java#L41-L77","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_set).","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_set).","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"}