{"record":{"id":"67e0ad84b78289da","repo":"hibernate/hibernate-orm","slug":"json-path-jsonpathhelper-tojsonpath-jsonpath","errorCode":null,"errorMessage":"JSON path [\" + JsonPathHelper.toJsonPath( jsonPathElements ) + \"] uses parameter [\" + parameterName + \"] that is not passed","messagePattern":"JSON path \\[\" \\+ JsonPathHelper\\.toJsonPath\\( jsonPathElements \\) \\+ \"\\] uses parameter \\[\" \\+ parameterName \\+ \"\\] that is not passed","errorType":"exception","errorClass":"QueryException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/dialect/function/json/CockroachDBJsonExistsFunction.java","lineNumber":91,"sourceCode":"\t\t\tsqlAppender.appendSql( \" as jsonb)\" );\n\t\t}\n\t\telse {\n\t\t\tsqlAppender.appendSql( ')' );\n\t\t}\n\t\tsqlAppender.appendSql( \"#>>array\" );\n\t\tchar separator = '[';\n\t\tfinal Dialect dialect = walker.getSessionFactory().getJdbcServices().getDialect();\n\t\tfor ( JsonPathHelper.JsonPathElement jsonPathElement : jsonPathElements ) {\n\t\t\tsqlAppender.appendSql( separator );\n\t\t\tif ( jsonPathElement instanceof JsonPathHelper.JsonAttribute attribute ) {\n\t\t\t\tdialect.appendLiteral( sqlAppender, attribute.attribute() );\n\t\t\t}\n\t\t\telse if ( jsonPathElement instanceof JsonPathHelper.JsonParameterIndexAccess ) {\n\t\t\t\tassert jsonPathPassingClause != null;\n\t\t\t\tfinal String parameterName = ( (JsonPathHelper.JsonParameterIndexAccess) jsonPathElement ).parameterName();\n\t\t\t\tfinal Expression expression = jsonPathPassingClause.getPassingExpressions().get( parameterName );\n\t\t\t\tif ( expression == null ) {\n\t\t\t\t\tthrow new QueryException( \"JSON path [\" + JsonPathHelper.toJsonPath( jsonPathElements ) + \"] uses parameter [\" + parameterName + \"] that is not passed\" );\n\t\t\t\t}\n\n\t\t\t\tsqlAppender.appendSql( \"cast(\" );\n\t\t\t\texpression.accept( walker );\n\t\t\t\tsqlAppender.appendSql( \" as text)\" );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsqlAppender.appendSql( '\\'' );\n\t\t\t\tsqlAppender.appendSql( ( (JsonPathHelper.JsonIndexAccess) jsonPathElement ).index() );\n\t\t\t\tsqlAppender.appendSql( '\\'' );\n\t\t\t}\n\t\t\tseparator = ',';\n\t\t}\n\t\tsqlAppender.appendSql( \"] is not null\" );\n\t}\n}\n","sourceCodeStart":73,"sourceCodeEnd":108,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/dialect/function/json/CockroachDBJsonExistsFunction.java#L73-L108","documentation":"Error \"JSON path [\" + JsonPathHelper.toJsonPath( jsonPathElements ) + \"] 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 (CockroachDB).","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 (CockroachDB).","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"}