flowable/flowable-engine · error · FlowableException

Exception while invoking '${name}' on class ${target.getClas

Error message

Exception while invoking '${name}' on class ${target.getClass().getName()}

What it means

Flowable wraps an InvocationTargetException thrown when the setter method itself threw an exception during execution. The original exception is the cause; Flowable only reports that invoking '<name>' on the target class failed.

Source

Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/util/ReflectUtil.java:258

                        return method;
                    }
                }
            }
            return null;
        } catch (SecurityException e) {
            throw new FlowableException("Not allowed to access method " + setterName + " on class " + clazz.getCanonicalName(), e);
        }
    }
    
    public static void invokeSetter(Method setterMethod, Object target, String name, Object value) {
        try {
            setterMethod.invoke(target, value);
        } catch (IllegalArgumentException e) {
            throw new FlowableException("Error while invoking '" + name + "' on class " + target.getClass().getName(), e);
        } catch (IllegalAccessException e) {
            throw new FlowableException("Illegal access when calling '" + name + "' on class " + target.getClass().getName(), e);
        } catch (InvocationTargetException e) {
            throw new FlowableException("Exception while invoking '" + name + "' on class " + target.getClass().getName(), e);
        }
    }

    private static Method findMethod(Class<? extends Object> clazz, String methodName, Object[] args) {
        for (Method method : clazz.getDeclaredMethods()) {
            // TODO add parameter matching
            if (method.getName().equals(methodName) && matches(method.getParameterTypes(), args)) {
                return method;
            }
        }
        Class<?> superClass = clazz.getSuperclass();
        if (superClass != null) {
            return findMethod(superClass, methodName, args);
        }
        return null;
    }

    public static Object instantiate(String className, Object[] args) {

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Inspect the cause chain (InvocationTargetException.getCause()) to find the real exception thrown by the setter
  2. Fix the value being set so the setter's validation succeeds
  3. Debug the setter body for the failing logic
  4. Check library changelog if the setter is from a dependency that changed requirements

Example fix

// before
config.setProperty("historyLevel", "INVALID"); // setter throws for unknown level
// after
config.setProperty("historyLevel", "audit");
Defensive patterns

Strategy: try-catch

Validate before calling

// validate the value against the setter's expectations before invoking, e.g.
if (value == null && setter.getParameterTypes()[0].isPrimitive()) throw new IllegalArgumentException("null for primitive setter");

Try / catch

try {
    ReflectUtil.invokeSetter(setter, target, name, value);
} catch (FlowableException e) {
    Throwable cause = e.getCause();
    logger.error("Setter " + name + " threw " + cause.getClass().getName(), cause);
}

Prevention

When it happens

Trigger: invokeSetter calls a setter whose body throws (e.g. validation inside the setter fails, NPE inside setter logic) during reflective bean population.

Common situations: Setters that validate configuration values and throw on invalid input; setters depending on uninitialized state; upgraded library setters that changed behavior.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


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