flowable/flowable-engine · error · PropertyNotFoundException

error.property.base.null

Error message

error.property.base.null

What it means

AstMethod.eval first evaluates the prefix (base object) of a method expression. If the base is null and the caller did not request null-on-null-base, it throws PropertyNotFoundException('error.property.base.null'), meaning the object on which a method was invoked evaluated to null.

Solutions

  1. Ensure the base variable is set before evaluation (initialize the bean or process variable).
  2. Add safe-navigation or a guard: ${person != null ? person.getName() : ''}.
  3. Correct the variable name in the expression if it was misspelled.
  4. Register the expected bean in the ELResolver/ELContext so the prefix resolves.

Example fix

// before
${order.customer.getName()} // customer is null
// after
${order.customer != null ? order.customer.getName() : 'unknown'}
Defensive patterns

Strategy: validation

Validate before calling

Object base = factory.createValueExpression(ctx, "${person}", Object.class).getValue(context);
if (base == null) throw new IllegalStateException("Base object 'person' is null; cannot invoke method");

Type guard

boolean baseResolved(String exprPrefix, ELContext ctx) {
    return factory.createValueExpression(ctx, "${" + exprPrefix + "}", Object.class).getValue(ctx) != null;
}

Try / catch

try {
    return expr.getValue(context);
} catch (PropertyNotFoundException e) {
    if (!e.getMessage().contains("base.null")) throw e;
    return null; // or initialize the base and retry
}

Prevention

When it happens

Trigger: Expressions like ${person.getName()} where 'person' is null or resolves to null (uninitialized variable, missing process variable, resolver returning null); chained calls on possibly-null paths like ${a.b.method()} where a.b is null.

Common situations: Missing process/context variables in Flowable; bean not registered in the EL context; typo in variable name; data not yet loaded when expression is evaluated.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/767ff68945286162. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/de/odysseus/el/tree/impl/ast/AstMethod.java:89

	
	@Override
	public final ValueReference getValueReference(Bindings bindings, ELContext context) {
		return null;
	}

	@Override
	public void appendStructure(StringBuilder builder, Bindings bindings) {
		property.appendStructure(builder, bindings);
		params.appendStructure(builder, bindings);
	}

	protected Object eval(Bindings bindings, ELContext context, boolean answerNullIfBaseIsNull) {
		Object base = property.getPrefix().eval(bindings, context);
		if (base == null) {
			if (answerNullIfBaseIsNull) {
				return null;
			}
			throw new PropertyNotFoundException(LocalMessages.get("error.property.base.null", property.getPrefix()));
		}
		Object method = property.getProperty(bindings, context);
		if (method == null) {
			throw new PropertyNotFoundException(LocalMessages.get("error.property.method.notfound", "null", base));
		}
		String name = bindings.convert(method, String.class);

		context.setPropertyResolved(false);
		Object result = context.getELResolver().invoke(context, base, name, null, params.eval(bindings, context));
		if (!context.isPropertyResolved()) {
			throw new MethodNotFoundException(LocalMessages.get("error.property.method.notfound", name, base.getClass()));
		}
		return result;
	}

	@Override
	public Object eval(Bindings bindings, ELContext context) {
		return eval(bindings, context, true);

View on GitHub (pinned to d6d39ce1c6)