{"record":{"id":"87147237e6751452","repo":"flowable/flowable-engine","slug":"error-property-base-null-871472","errorCode":null,"errorMessage":"error.property.base.null","messagePattern":"error\\.property\\.base\\.null","errorType":"exception","errorClass":"PropertyNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/de/odysseus/el/tree/impl/ast/AstProperty.java","lineNumber":57,"sourceCode":"\n\tpublic AstProperty(AstNode prefix, boolean lvalue, boolean strict, boolean ignoreReturnType) {\n\t\tthis.prefix = prefix;\n\t\tthis.lvalue = lvalue;\n\t\tthis.strict = strict;\n\t\tthis.ignoreReturnType = ignoreReturnType;\n\t}\n\n\tprotected abstract Object getProperty(Bindings bindings, ELContext context) throws ELException;\n\n\tprotected AstNode getPrefix() {\n\t\treturn prefix;\n\t}\n\n\t@Override\n\tpublic ValueReference getValueReference(Bindings bindings, ELContext context) {\n\t\tObject base = prefix.eval(bindings, context);\n\t\tif (base == null) {\n\t\t\tthrow new PropertyNotFoundException(LocalMessages.get(\"error.property.base.null\", prefix));\n\t\t}\n\t\tObject property = getProperty(bindings, context);\n\t\tif (property == null && strict) {\n\t\t\tthrow new PropertyNotFoundException(LocalMessages.get(\"error.property.property.notfound\", \"null\", base));\n\t\t}\n\t\treturn new ValueReference(base, property);\n\t}\n\t\n\t@Override\n\tpublic Object eval(Bindings bindings, ELContext context) {\n\t\tObject base = prefix.eval(bindings, context);\n\t\tif (base == null) {\n\t\t\treturn null;\n\t\t}\n\t\tObject property = getProperty(bindings, context);\n\t\tif (property == null && strict) {\n\t\t\treturn null;\n\t\t}","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/de/odysseus/el/tree/impl/ast/AstProperty.java#L39-L75","documentation":"AstProperty.getValueReference evaluates the prefix base object and requires it to be non-null to build a ValueReference. When the base is null it throws PropertyNotFoundException('error.property.base.null'), i.e. you tried to get a value reference on a property of a null object.","triggerScenarios":"getValueReference/ValueReference resolution (e.g. for setting or ELContext-based resolution) on expressions like ${person.name} where 'person' evaluates to null; chained navigation ${a.b.c} where an intermediate is null.","commonSituations":"Uninitialized beans/process variables; resolver returning null for a lookup key; expressions evaluated before the model is populated (e.g. early form rendering).","solutions":["Initialize/populate the base variable before evaluating the expression.","Use null-guarded expressions: ${person != null ? person.name : null} or null-safe resolver behavior.","Fix the variable name/registration so the prefix resolves to the intended bean.","Defer evaluation until the object graph is ready."],"exampleFix":"// before\nValueReference vr = ve.getValueReference(context); // ${user.email}, user==null\n// after\nif (factory.createValueExpression(ctx, \"${user}\", Object.class).getValue(context) != null) {\n    ValueReference vr = ve.getValueReference(context);\n}","handlingStrategy":"validation","validationCode":"Object base = factory.createValueExpression(ctx, \"${user}\", Object.class).getValue(context);\nif (base == null) throw new IllegalStateException(\"Cannot get ValueReference: base 'user' is null\");","typeGuard":"boolean hasNonNullBase(Bindings b, ELContext ctx, AstNode prefix) {\n    return prefix.eval(b, ctx) != null;\n}","tryCatchPattern":"try {\n    ValueReference vr = ve.getValueReference(context);\n} catch (PropertyNotFoundException e) {\n    if (!e.getMessage().contains(\"base.null\")) throw e;\n    return null; // handle missing base gracefully\n}","preventionTips":["Resolve/populate the base object before obtaining ValueReferences","Use null-safe conditional expressions in EL for optional objects","Fail fast at model-preparation time when required beans are missing"],"tags":["el","expression-language","null-base"],"backgroundTag":"null-argument","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"}