{"record":{"id":"304c0a3a48fa42b3","repo":"flowable/flowable-engine","slug":"error-property-on-type-base-getclass-get","errorCode":null,"errorMessage":"Error '${property}' on type '${base.getClass().getName()}'","messagePattern":"Error '(.+?)' on type '(.+?)'","errorType":"exception","errorClass":"ELException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/javax/el/BeanELResolver.java","lineNumber":190,"sourceCode":"\t\t\tthrow new PropertyNotWritableException(\"resolver is read-only\");\n\t\t}\n\t\tBeanProperty beanProperty = property(base, property);\n\n\t\tif (beanProperty == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tMethod method = beanProperty.write(base);\n\t\tif (method == null) {\n\t\t\tthrow new PropertyNotWritableException(\"Cannot write property: '\" + property + \"' on type \" + base.getClass().getName());\n\t\t}\n\t\tcontext.setPropertyResolved(base, property);\n\t\ttry {\n\t\t\tinvoke(method, base, value);\n\t\t} catch (InvocationTargetException e) {\n\t\t\tThrowable cause = e.getCause();\n\t\t\tUtil.handleThrowable(cause);\n\t\t\tthrow new ELException(\"Error '\" + property + \"' on type '\" + base.getClass().getName() + \"'\", cause);\n\t\t} catch (Exception e) {\n\t\t\tthrow new ELException(e);\n\t\t}\n\t}\n\n\t@Override\n\tpublic Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) {\n\t\tObjects.requireNonNull(context, \"context is null\");\n\t\tif (base == null || method == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tObject result = null;\n\t\tif (params == null) {\n\t\t\tparams = new Object[0];\n\t\t}\n\t\tString name = method.toString();\n\t\tMethod target = Util.findMethod(context, base.getClass(), base, name, paramTypes, params);","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/javax/el/BeanELResolver.java#L172-L208","documentation":"BeanELResolver.setValue wraps exceptions thrown by a bean's setter invoked during EL assignment in an ELException with the message \"Error '<property>' on type '<class>'\". The real failure inside the setter is preserved as the cause via InvocationTargetException.","triggerScenarios":"Evaluating ${bean.name = value} where calling the matching setXxx(value) method throws — e.g. IllegalArgumentException from type conversion inside the setter, NPE, or validation failure in the setter body.","commonSituations":"Setters with validation or type coercion logic rejecting the EL-supplied value (e.g. assigning a String to an int property via a lenient path); setters performing persistence that fails.","solutions":["Inspect the ELException's cause — fix the logic inside the setter.","Ensure the assigned EL value's type matches the setter parameter type.","Validate/sanitize the value before the assignment expression runs."],"exampleFix":"// before\npublic void setAge(String a) { this.age = Integer.parseInt(a); } // throws on 'abc'\n// after\npublic void setAge(Integer a) { this.age = a; } // EL passes matching type","handlingStrategy":"try-catch","validationCode":"// pre-validate value type against setter\nClass<?> pt = new PropertyDescriptor(prop, bean.getClass()).getWriteMethod().getParameterTypes()[0]; if (!pt.isInstance(value)) throw new IllegalArgumentException(\"type mismatch\");","typeGuard":null,"tryCatchPattern":"try { resolver.setValue(ctx, base, prop, val); } catch (ELException e) { log.error(\"setter failed for \" + prop, e.getCause()); }","preventionTips":["Match EL-assigned values to setter parameter types","Keep setters free of throwing validation; validate upstream","Log the cause chain, not just the ELException"],"tags":["el","bean","setter","reflection","expression-language"],"backgroundTag":"unexpected-api-response-shape","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}