flowable/flowable-engine · error · MethodNotFoundException
Cannot find method ${name} with ${params.length} parameters
Error message
Cannot find method ${name} with ${params.length} parameters in ${base.getClass()} What it means
BeanELResolver.invoke throws MethodNotFoundException when Util.findMethod cannot locate a method matching the requested name and parameter types on the base object's class. The message includes the method string and the number of supplied parameters.
Source
Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/javax/el/BeanELResolver.java:210
throw new ELException(e);
}
}
@Override
public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) {
Objects.requireNonNull(context, "context is null");
if (base == null || method == null) {
return null;
}
Object result = null;
if (params == null) {
params = new Object[0];
}
String name = method.toString();
Method target = Util.findMethod(context, base.getClass(), base, name, paramTypes, params);
if (target == null) {
throw new MethodNotFoundException("Cannot find method " + name + " with " + params.length + " parameters in " + base.getClass());
}
Object[] parameters = Util.buildParameters(context, target.getParameterTypes(), target.isVarArgs(), params);
try {
result = invoke(target, base, parameters);
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
Util.handleThrowable(cause);
throw new ELException(cause);
} catch (IllegalArgumentException | IllegalAccessException e) {
throw new ELException(e);
}
context.setPropertyResolved(base, method);
return result;
}
protected Object invoke(Method target, Object base, Object... parameters) throws InvocationTargetException, IllegalAccessException {
return target.invoke(base, parameters);View on GitHub (pinned to d6d39ce1c6)
Solutions
- Verify the exact method name and that it is public on the base object's class.
- Match the argument count and types to an existing overload (mind varargs and autoboxing).
- Expose a public wrapper method on the bean if the intended target is inaccessible.
Example fix
// before
${order.calcTotal()} // method renamed
// after
public BigDecimal calculateTotal() {...} -> ${order.calculateTotal()} Defensive patterns
Strategy: validation
Validate before calling
boolean exists = Arrays.stream(base.getClass().getMethods()).anyMatch(m -> m.getName().equals(name) && m.getParameterCount() == args.length);
Try / catch
try { result = resolver.invoke(ctx, base, method, paramTypes, args); } catch (MethodNotFoundException e) { /* fix name/arity/types */ } Prevention
- Verify method name, arity, and argument types before adding EL method calls
- Keep invoked methods public
- Add smoke tests that evaluate all expression strings used in configs
When it happens
Trigger: Calling ${bean.method(arg)} in EL where no method with that name/arity/parameter types exists — wrong method name, wrong number of arguments, argument types that cannot be coerced to a matching signature, or the method is not public.
Common situations: Typos in EL method calls; calling methods with primitives vs wrapper mismatches after refactoring; invoking methods removed in a library version upgrade; calling non-public methods from expressions.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Error reading '' on type ''
- ELException
- Error '${property}' on type '${base.getClass().getName()}'
- Method not found: ${clazz}.${methodName}(${paramString(param
- Method not found: ${clazz}.${name}(${paramString(paramTypes)
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/a225dc4c722a9a00.
Report an issue: GitHub.