{"record":{"id":"5cf00f4b6fc3b066","repo":"hibernate/hibernate-orm","slug":"null-value-not-allowed-for-multi-valued-parameter-5cf00f","errorCode":null,"errorMessage":"Null value not allowed for multi-valued parameter ':{paramName}'","messagePattern":"Null value not allowed for multi-valued parameter ':(.+?)'","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/internal/AbstractCommonQueryContract.java","lineNumber":1629,"sourceCode":"\t\t}\n\t\treturn this;\n\t}\n\n\t@Override\n\t@Nonnull\n\tpublic CommonQueryContractImplementor setProperties(@Nonnull Object bean) {\n\t\tfinal var beanClass = bean.getClass();\n\t\tfor ( String paramName : getParameterMetadata().getNamedParameterNames() ) {\n\t\t\ttry {\n\t\t\t\tfinal var getter =\n\t\t\t\t\t\tBuiltInPropertyAccessStrategies.BASIC.getStrategy()\n\t\t\t\t\t\t\t\t.buildPropertyAccess( beanClass, paramName, true )\n\t\t\t\t\t\t\t\t.getGetter();\n\t\t\t\tfinal var returnType = getter.getReturnTypeClass();\n\t\t\t\tfinal Object object = getter.get( bean );\n\t\t\t\tif ( Collection.class.isAssignableFrom( returnType ) ) {\n\t\t\t\t\tif ( object == null ) {\n\t\t\t\t\t\tthrow new IllegalArgumentException( \"Null value not allowed for multi-valued parameter ':\" + paramName + \"'\" );\n\t\t\t\t\t}\n\t\t\t\t\tsetParameterList( paramName, (Collection<?>) object );\n\t\t\t\t}\n\t\t\t\telse if ( returnType.isArray() ) {\n\t\t\t\t\tif ( object == null ) {\n\t\t\t\t\t\tthrow new IllegalArgumentException( \"Null value not allowed for array-valued parameter ':\" + paramName + \"'\" );\n\t\t\t\t\t}\n\t\t\t\t\tsetParameterList( paramName, (Object[]) object );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsetParameter( paramName, object, determineType( paramName, returnType ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (PropertyNotFoundException pnfe) {\n\t\t\t\t// ignore\n\t\t\t}\n\t\t}\n\t\treturn this;","sourceCodeStart":1611,"sourceCodeEnd":1647,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/internal/AbstractCommonQueryContract.java#L1611-L1647","documentation":"Error \"Null value not allowed for multi-valued parameter ':{paramName}'\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Null is bound to a collection/array-valued parameter: Null value not allowed for multi-valued parameter ':<value>'","commonSituations":"Passing a null collection or array (or a collection containing null) to setParameterList()/an IN clause parameter.","solutions":["A null value was bound to a multi-valued parameter. Pass a non-null collection (empty if appropriate) for the parameter."],"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"}