{"record":{"id":"6a549dc54d6cec97","repo":"flowable/flowable-engine","slug":"property-propertyname-not-found-on-type-ba","errorCode":null,"errorMessage":"Property '${propertyName}' not found on type '${base.getClass().getName()}'","messagePattern":"Property '(.+?)' not found on type '(.+?)'","errorType":"exception","errorClass":"PropertyNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/javax/el/RecordELResolver.java","lineNumber":70,"sourceCode":"     * @throws PropertyNotFoundException if the {@code base} is an instance of {@link Record} and the specified property\n     * does not exist.\n     * @throws ELException if an exception was throws while performing the property resolution. The thrown\n     * exception must be included as the cause of this exception, if available.\n     */\n    @Override\n    public Object getValue(ELContext context, Object base, Object property) {\n        Objects.requireNonNull(context);\n\n        if (base instanceof Record && property != null) {\n            context.setPropertyResolved(base, property);\n\n            String propertyName = property.toString();\n\n            Method method;\n            try {\n                method = base.getClass().getMethod(propertyName);\n            } catch (NoSuchMethodException nsme) {\n                throw new PropertyNotFoundException(\"Property '\" + propertyName + \"' not found on type '\" + base.getClass().getName() + \"'\", nsme);\n            }\n\n            if (Modifier.isPublic(method.getModifiers())) {\n                method.trySetAccessible();\n            }\n            try {\n                return method.invoke(base);\n            } catch (ReflectiveOperationException e) {\n                throw new ELException(\"Error reading '\" + propertyName + \"' on type '\" + base.getClass().getName() + \"'\", e);\n            }\n        }\n        return null;\n    }\n\n    /**\n     * If the base object is an instance of {@link Record}, always returns {@code null} since {@link Record}s are always\n     * read-only.\n     * <p>","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/javax/el/RecordELResolver.java#L52-L88","documentation":"RecordELResolver.getValue resolves record component accessors via reflection: it looks up a public no-arg method named exactly like the property on the record class. If getMethod finds no such accessor it wraps the NoSuchMethodException in a PropertyNotFoundException.","triggerScenarios":"Evaluating ${record.property} where the record has no component (or accessor method) with that exact name; typos in property names; using a method name that exists but with parameters or is inherited/non-accessor.","commonSituations":"Renaming a record component without updating EL expressions in process/BPMN XML; expressions written for POJO getters (e.g. getName) applied to records that expose name(); case mismatch (Name vs name).","solutions":["Fix the property name in the expression to match the record component exactly (case-sensitive)","Add or rename the record component/accessor to match the expression","Check the record class version on the classpath matches what the expression expects","Catch PropertyNotFoundException during EL evaluation and log the expression and type"],"exampleFix":"// before\npublic record Order(String OrderRef) {}\n${order.orderRef} // not found: component is OrderRef\n// after\npublic record Order(String orderRef) {}\n${order.orderRef}","handlingStrategy":"validation","validationCode":"boolean hasProperty(Class<?> t, String name){ try { t.getMethod(name); return true; } catch (NoSuchMethodException e){ return false; } }","typeGuard":"boolean isRecordAccessor(Class<?> t, String n){ return java.lang.reflect.RecordComponent.class.isAssignableFrom(Object.class) && hasProperty(t, n); }","tryCatchPattern":"try { return expr.getValue(ctx); } catch (PropertyNotFoundException e) { log.error(\"Unknown EL property: {}\", e.getMessage()); throw e; }","preventionTips":["Match property names to record components exactly","Update expressions when renaming components","Evaluate all referenced expressions in unit tests","Watch case sensitivity (name vs Name)"],"tags":[],"backgroundTag":null,"analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}