{"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":"Spec-required translation in getOutputParameterValue(int): the underlying Outputs machinery raised ParameterStrategyException because the call mixes named and positional parameter registrations, which the JPA positional accessor cannot honor. The faulty input is the ProcedureCall's parameter registration style; use only named or only positional parameters in one call.","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":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}