flowable/flowable-engine · error · ActivitiIllegalArgumentException
Class does not implement
Error message
Class %s does not implement %s
What it means
DelegateActivitiEventListener lazily instantiates its listener delegate from a class name via reflection. If the instantiated object does not implement FlowableEventListener, it throws ActivitiIllegalArgumentException and forces the dispatch to fail rather than silently skip the event.
Solutions
- Make the configured class implement org.flowable.engine.delegate.event.FlowableEventListener (with onEvent and isFailOnException)
- Fix the class name in the listener registration to point at the actual listener class
- Check for stale copies of the class still implementing an old/other interface
- Redeploy/restart after correcting the configuration
Example fix
// before
public class MyListener { /* no interface */ }
// after
public class MyListener implements FlowableEventListener {
public void onEvent(FlowableEvent event) { /* ... */ }
public boolean isFailOnException() { return true; }
} Defensive patterns
Strategy: validation
Validate before calling
if (!FlowableEventListener.class.isAssignableFrom(listenerClass)) throw new IllegalArgumentException(listenerClass + " must implement FlowableEventListener");
Prevention
- Always implement FlowableEventListener for classes used as event listeners
- Verify listener class names at engine configuration time
- Write a config test that instantiates all registered listeners
When it happens
Trigger: An event listener registered (e.g. via engine config addEventlistener or process XML <flowable:eventListener>) with a class attribute whose class exists and instantiates, but does not implement org.flowable.engine.delegate.event.FlowableEventListener.
Common situations: Registering a plain POJO or wrong listener interface implementation by mistake; migrating from another listener interface (e.g. ActivitiEventListener in old versions vs FlowableEventListener); class name pointing to an unrelated class after refactor.
Related errors
- No execution context active and event is not related to an…
- Delegate expression did not resolve to an implementation of…
- BPMN XSD could not be found
- Cannot create 'script' task listener. Missing ScriptInfo.
- Cannot have more than one message event subscription with…
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/6a11fc1acc43c165.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/helper/DelegateActivitiEventListener.java:63
}
@Override
public boolean isFailOnException() {
if (delegateInstance != null) {
return delegateInstance.isFailOnException();
}
return failOnException;
}
protected FlowableEventListener getDelegateInstance() {
if (delegateInstance == null) {
Object instance = ReflectUtil.instantiate(className);
if (instance instanceof FlowableEventListener) {
delegateInstance = (FlowableEventListener) instance;
} else {
// Force failing of the listener invocation, since the delegate cannot be created
failOnException = true;
throw new ActivitiIllegalArgumentException("Class " + className
+ " does not implement " + FlowableEventListener.class.getName());
}
}
return delegateInstance;
}
}
View on GitHub (pinned to d6d39ce1c6)