flowable/flowable-engine · error · IllegalArgumentException
Expected eventRegistryEngine configuration to be of type…
Error message
Expected eventRegistryEngine configuration to be of type class org.flowable.eventregistry.spring.SpringEventRegistryEngineConfiguration but was ...
What it means
SpringEventRegistryConfigurator.configure requires the injected eventEngineConfiguration to be a SpringEventRegistryEngineConfiguration. If a different EventRegistryEngineConfiguration subclass (or incompatible configuration) was set, it throws IllegalArgumentException showing the expected and actual types.
Solutions
- Set the configuration to a SpringEventRegistryEngineConfiguration instance (or leave it null to let the configurator create one).
- Remove any conflicting eventRegistryEngineConfiguration bean/property of the wrong type.
- Align your engine setup with the Spring configurator's expectations (SpringEngineConfiguration parent).
- Check classpath for duplicate flowable-event-registry versions pulling in the wrong configuration class.
Example fix
// before configurator.setEventEngineConfiguration(new EventRegistryEngineConfiguration()); // after configurator.setEventEngineConfiguration(new SpringEventRegistryEngineConfiguration());
Defensive patterns
Strategy: validation
Validate before calling
if (eventEngineConfiguration != null
&& !(eventEngineConfiguration instanceof SpringEventRegistryEngineConfiguration)) {
throw new IllegalArgumentException("Use SpringEventRegistryEngineConfiguration with the Spring configurator");
} Type guard
null
Try / catch
try {
configurator.configure(engineConfiguration);
} catch (IllegalArgumentException e) {
logger.error("Wrong event registry config type: {}", e.getMessage());
} Prevention
- Only inject SpringEventRegistryEngineConfiguration into the Spring configurator
- Leave the config null to let the configurator create a default
- Check for duplicate/conflicting flowable-event-registry versions on the classpath
When it happens
Trigger: Programmatically or via Spring XML/properties setting eventRegistryEngineConfiguration to a non-Spring EventRegistryEngineConfiguration before the configurator runs.
Common situations: Mixing plain (non-Spring) event registry configuration with the Spring configurator; copy-pasted engine configuration from a non-Spring boot setup; bean of wrong type auto-wired into the configurator.
Related errors
- Expected dmnEngine configuration to be of type…
- Expected idmEngine configuration to be of type…
- ackMode in definition
- At least one of topics, topicPartitions or topicPattern…
- Channel definition cannot resolve as a String[] or a String…
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/54da701ceb4c9707.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-event-registry-spring-configurator/src/main/java/org/flowable/eventregistry/spring/configurator/SpringEventRegistryConfigurator.java:32
import org.flowable.common.engine.impl.AbstractEngineConfiguration;
import org.flowable.common.spring.SpringEngineConfiguration;
import org.flowable.eventregistry.impl.configurator.EventRegistryEngineConfigurator;
import org.flowable.eventregistry.spring.SpringEventRegistryEngineConfiguration;
/**
* @author Tijs Rademakers
* @author Joram Barrez
*/
public class SpringEventRegistryConfigurator extends EventRegistryEngineConfigurator {
@Override
public void configure(AbstractEngineConfiguration engineConfiguration) {
if (eventEngineConfiguration == null) {
eventEngineConfiguration = new SpringEventRegistryEngineConfiguration();
} else if (!(eventEngineConfiguration instanceof SpringEventRegistryEngineConfiguration)) {
throw new IllegalArgumentException("Expected eventRegistryEngine configuration to be of type "
+ SpringEventRegistryEngineConfiguration.class + " but was " + eventEngineConfiguration.getClass());
}
initialiseCommonProperties(engineConfiguration, eventEngineConfiguration);
SpringEngineConfiguration springEngineConfiguration = (SpringEngineConfiguration) engineConfiguration;
((SpringEventRegistryEngineConfiguration) eventEngineConfiguration).setTransactionManager(springEngineConfiguration.getTransactionManager());
if (eventEngineConfiguration.getBeans() == null) {
eventEngineConfiguration.setBeans(engineConfiguration.getBeans());
}
initEngine();
initServiceConfigurations(engineConfiguration, eventEngineConfiguration);
}
}
View on GitHub (pinned to d6d39ce1c6)