flowable/flowable-engine · error · MethodNotFoundException

Method not found: ${clazz}.${methodName}(${paramString(param

Error message

Method not found: ${clazz}.${methodName}(${paramString(paramTypes)})

What it means

Flowable's embedded JUEL EL implementation throws MethodNotFoundException when expression-language method resolution cannot find a method to invoke. This specific throw happens when the class name or the method name passed to the resolver is null, i.e. the expression itself is malformed or the resolver was invoked without the required inputs. It duplicates the behavior of Tomcat's org.apache.el.util.ReflectionUtil.

Source

Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/javax/el/Util.java:74

     *
     * @param t the Throwable to check
     */
    static void handleThrowable(Throwable t) {
        if (t instanceof VirtualMachineError) {
            throw (VirtualMachineError) t;
        }
        // All other instances of Throwable will be silently swallowed
    }


    /*
     * This method duplicates code in org.apache.el.util.ReflectionUtil. When making changes keep the code in sync.
     */
    static Method findMethod(ELContext context, Class<?> clazz, Object base, String methodName, Class<?>[] paramTypes,
            Object[] paramValues) {

        if (clazz == null || methodName == null) {
            throw new MethodNotFoundException("Method not found: " + clazz + "." + methodName + "(" + paramString(paramTypes) + ")");
        }

        if (paramTypes == null) {
            paramTypes = getTypesFromValues(paramValues);
        }

        // Fast path: when no arguments exist, there can only be one matching method and no need for coercion.
        if (paramTypes.length == 0) {
            try {
                Method method = clazz.getMethod(methodName, paramTypes);
                return getMethod(clazz, base, method);
            } catch (NoSuchMethodException | SecurityException ignore) {
                // Fall through to broader, slower logic
            }
        }

        Method[] methods = clazz.getMethods();

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Fix the EL expression so the target object and method name are non-null and the method actually exists on the target class
  2. Verify the bean used in the expression is registered (Spring bean, bean resolver) and not null at evaluation time
  3. Check deployed process definitions for stale method references after refactoring; redeploy corrected BPMN/JSON models

Example fix

// before (expression in BPMN)
${orderService.procesOrder(order)}
// after
${orderService.processOrder(order)}
Defensive patterns

Strategy: validation

Validate before calling

if (targetBean == null) throw new IllegalStateException("EL target bean is null for expression: " + expr);
if (!hasMethod(targetBean.getClass(), methodName)) throw new IllegalStateException("Method missing: " + methodName);

Type guard

boolean isResolvable(Object base, String name) { return base != null && name != null && Arrays.stream(base.getClass().getMethods()).anyMatch(m -> m.getName().equals(name)); }

Try / catch

try { result = Util.result(context, base, methodName, argTypes, args); } catch (MethodNotFoundException e) { logger.error("EL method resolution failed: {}", e.getMessage()); throw e; }

Prevention

When it happens

Trigger: Calling Util.findMethod with a null clazz or null methodName; evaluating an EL expression like ${obj.method()} where the target bean resolves to null or the method name part of the expression cannot be resolved.

Common situations: Typo in a method name inside a UEL expression in a BPMN process (listener delegateExpression, task attribute); a bean referenced by an expression evaluates to null because it was not registered as a Spring/process-engine bean; refactoring removed a method still referenced in a deployed process definition.

Related errors


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