{"record":{"id":"c5c5c397dbf9a8ef","repo":"flowable/flowable-engine","slug":"error-reading-on-type","errorCode":null,"errorMessage":"Error reading '' on type ''","messagePattern":"Error reading '' 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":158,"sourceCode":"\t\tif (base == null || property == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tBeanProperty beanProperty = property(base, property);\n\t\tif (beanProperty == null) {\n\t\t\treturn null;\n\t\t}\n\t\tMethod m = beanProperty.read(base);\n\t\tif (m == null) {\n\t\t\treturn null;\n\t\t}\n\t\tcontext.setPropertyResolved(base, property);\n\t\ttry {\n\t\t\treturn invoke(m, base, (Object[]) null);\n\t\t} catch (InvocationTargetException e) {\n\t\t\tThrowable cause = e.getCause();\n\t\t\tUtil.handleThrowable(cause);\n            throw new ELException(\"Error reading '\" + 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 void setValue(ELContext context, Object base, Object property, Object value) {\n\t\tObjects.requireNonNull(context, \"context is null\");\n\t\tif (base == null || property == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (readOnly) {\n\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) {","sourceCodeStart":140,"sourceCodeEnd":176,"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#L140-L176","documentation":"BeanELResolver.getValue wraps exceptions thrown by a bean's getter invoked during EL evaluation in an ELException with the message \"Error reading '<property>' on type '<class>'\". The underlying InvocationTargetException cause (the real error inside the getter) is attached as the cause.","triggerScenarios":"Evaluating ${bean.someProperty} where calling the corresponding getXxx() method throws any exception (NPE, IllegalStateException, remote call failure, etc.).","commonSituations":"Getters with side effects (lazy DB/service lookups) failing at expression evaluation time in process expressions, forms, or templates; getter NPEs on not-yet-initialized fields.","solutions":["Inspect the cause chain of the ELException — the fix belongs in the getter that threw, not the EL layer.","Make the getter null-safe / fail-fast for uninitialized state.","Precompute the value before evaluation and pass it as a plain variable instead of relying on a throwing getter."],"exampleFix":"// before\npublic String getName() { return owner.getName(); } // NPEs when owner is null\n// after\npublic String getName() { return owner != null ? owner.getName() : null; }","handlingStrategy":"try-catch","validationCode":"// before evaluation: invoke the getters yourself\nfor (String p : props) { try { new PropertyDescriptor(p, bean.getClass()).getReadMethod().invoke(bean); } catch (Exception e) { /* fix getter */ } }","typeGuard":null,"tryCatchPattern":"try { v = resolver.getValue(ctx, bean, prop); } catch (ELException e) { log.error(\"getter failed for \" + prop, e.getCause()); }","preventionTips":["Keep getters side-effect free and null-safe","Never do DB/remote calls inside getters used by EL","Precompute values into variables before evaluation"],"tags":["el","bean","getter","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"}