{"record":{"id":"3d1c5c3074263a5d","repo":"hibernate/hibernate-orm","slug":"illegalargumentexception-occurred-while-calling-se","errorCode":null,"errorMessage":"IllegalArgumentException occurred while calling setter for property [%s.%s (expected type = %s)]; target = [%s], property value = [%s]","messagePattern":"IllegalArgumentException occurred while calling setter for property \\[(.+?)\\.(.+?) \\(expected type = (.+?)\\)\\]; target = \\[(.+?)\\], property value = \\[(.+?)\\]","errorType":"exception","errorClass":"PropertySetterAccessException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/property/access/spi/SetterMethodImpl.java","lineNumber":100,"sourceCode":"\t\t\t\t\tpropertyName\n\t\t\t);\n\t\t\t//cannot occur\n\t\t}\n\t\tcatch (IllegalArgumentException iae) {\n\t\t\tif ( value == null && isPrimitive ) {\n\t\t\t\tthrow new PropertyAccessException(\n\t\t\t\t\t\tiae,\n\t\t\t\t\t\t\"Null value was assigned to a property of primitive type\",\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tcontainerClass,\n\t\t\t\t\t\tpropertyName\n\t\t\t\t);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfinal var expectedType = setterMethod.getParameterTypes()[0];\n\t\t\t\tCORE_LOGGER.illegalPropertySetterArgument( containerClass.getName(), propertyName );\n\t\t\t\tCORE_LOGGER.expectedType( expectedType.getName(), value == null ? null : value.getClass().getName() );\n\t\t\t\tthrow new PropertySetterAccessException(\n\t\t\t\t\t\tiae,\n\t\t\t\t\t\tcontainerClass,\n\t\t\t\t\t\tpropertyName,\n\t\t\t\t\t\texpectedType,\n\t\t\t\t\t\ttarget,\n\t\t\t\t\t\tvalue\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic Class<?> getContainerClass() {\n\t\treturn containerClass;\n\t}\n\n\t@Override\n\tpublic String getMethodName() {\n\t\treturn setterMethod.getName();","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/property/access/spi/SetterMethodImpl.java#L82-L118","documentation":"Error \"IllegalArgumentException occurred while calling setter for property [%s.%s (expected type = %s)]; target = [%s], property value = [%s]\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A runtime precondition of the Hibernate API is violated.","commonSituations":"Occurs when application code or configuration does not satisfy the documented contract of the API being called.","solutions":["Pass a value assignable to the property's declared type.","Register an AttributeConverter if the persisted type differs from the property type."],"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"}