flowable/flowable-engine · error · FlowableException

Error getting method

Error message

Error getting method 

What it means

AbstractFlowableFunctionDelegate.getNoParameterMethod() reflectively looks up a declared no-arg method named after localName() on functionClass(). If lookup fails (missing method, wrong name, class loading issues) it wraps the cause in a FlowableException 'Error getting method <localName>'.

Solutions

  1. Ensure functionClass() declares a public method whose name exactly equals localName() with no parameters.
  2. Use the explicit-name overload getNoParameterMethod(String) if the Java method name differs from the EL local name.
  3. Check the functionClass is from the versioned dependency you expect (mvn dependency:tree) and that method visibility is public.

Example fix

// before
protected Class<?> functionClass() { return StringUtils.class; }
protected String localName() { return "toUpperCase"; } // no such no-arg method
// after
protected String localName() { return "upperCase"; } // matches StringUtils.upperCase()
// or: getNoParameterMethod("upperCase");
Defensive patterns

Strategy: validation

Validate before calling

try { functionClass().getDeclaredMethod(localName()); } catch (NoSuchMethodException e) { throw new IllegalStateException("Delegate misconfigured: no method " + localName() + " on " + functionClass()); }

Try / catch

try { new MyFunctionDelegate(); } catch (FlowableException e) { log.error("Function delegate init failed: {}", e.getMessage(), e.getCause()); }

Prevention

When it happens

Trigger: A FlowableFunctionDelegate subclass overrides functionClass()/localName() inconsistently so functionClass() has no declared no-arg method matching localName(); initialization of the function delegate at flowable-function registration time.

Common situations: Custom EL function delegates where localName does not match the Java method name; renaming the method in functionClass without updating the delegate; the function class not being on the classpath version expected.

Related errors


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

Appendix: source

Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/el/AbstractFlowableFunctionDelegate.java:38

/**
 * Abstract class that can be used as a base class for pluggable functions that can be used in the EL expressions
 * 
 * @author Tijs Rademakers
 */
public abstract class AbstractFlowableFunctionDelegate implements FlowableFunctionDelegate {
    
    /**
     * The class, typically containing static methods. 
     * If {@link #functionMethod()} is provided, this method does not need to return a value.
     */
    public abstract Class<?> functionClass();

    protected Method getNoParameterMethod() {
        try {
            return functionClass().getDeclaredMethod(localName());
        } catch (Exception e) {
            throw new FlowableException("Error getting method " + localName(), e);
        }
    }
    
    protected Method getNoParameterMethod(String methodName) {
        try {
            return functionClass().getDeclaredMethod(methodName);
        } catch (Exception e) {
            throw new FlowableException("Error getting method " + methodName, e);
        }
    }

    protected Method getSingleObjectParameterMethod() {
        try {
            return functionClass().getDeclaredMethod(localName(), Object.class);
        } catch (Exception e) {
            throw new FlowableException("Error getting method " + localName(), e);
        }
    }

View on GitHub (pinned to d6d39ce1c6)