{"record":{"id":"e9f681bf8519a77f","repo":"hibernate/hibernate-orm","slug":"invalid-mix-of-named-and-positional-parameters","errorCode":null,"errorMessage":"Invalid mix of named and positional parameters","messagePattern":"Invalid mix of named and positional parameters","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureCallImpl.java","lineNumber":1232,"sourceCode":"\t\t\texecute();\n\t\t\t// The expectation is that there is just one Output,\n\t\t\t// of type UpdateCountOutput\n\t\t\treturn getUpdateCount();\n\t\t}\n\t\tfinally {\n\t\t\tgetOutputs().release();\n\t\t}\n\t}\n\n\t@Override\n\tpublic Object getOutputParameterValue(int position) {\n\t\tcheckNotClosed();\n\t\t// According to spec, an exception thrown from this method should not mark for rollback.\n\t\ttry {\n\t\t\treturn getOutputs().getOutputParameterValue( position );\n\t\t}\n\t\tcatch (ParameterStrategyException e) {\n\t\t\tthrow new IllegalArgumentException( \"Invalid mix of named and positional parameters\", e );\n\t\t}\n\t\tcatch (NoSuchParameterException e) {\n\t\t\tthrow new IllegalArgumentException( e.getMessage(), e );\n\t\t}\n\t}\n\n\t@Override\n\tpublic Object getOutputParameterValue(@Nonnull String parameterName) {\n\t\tcheckNotClosed();\n\t\t// According to spec, an exception thrown from this method should not mark for rollback.\n\t\ttry {\n\t\t\treturn getOutputs().getOutputParameterValue( parameterName );\n\t\t}\n\t\tcatch (ParameterStrategyException e) {\n\t\t\tthrow new IllegalArgumentException( \"Invalid mix of named and positional parameters\", e );\n\t\t}\n\t\tcatch (NoSuchParameterException e) {\n\t\t\tthrow new IllegalArgumentException( e.getMessage(), e );","sourceCodeStart":1214,"sourceCodeEnd":1250,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureCallImpl.java#L1214-L1250","documentation":"Error \"Invalid mix of named and positional parameters\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A stored procedure / query parameter is bound or referenced inconsistently with its registration.","commonSituations":"Calling StoredProcedureQuery or Query with missing, misnamed, or mixed named/positional parameters.","solutions":["Use only named parameters or only positional parameters in a single procedure call, not both.","Re-register all parameters with a consistent naming style."],"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"}