flowable/flowable-engine · error · FlowableException
no org.flowable.dmn.engine.DmnEngine defined in the applicat
Error message
no org.flowable.dmn.engine.DmnEngine defined in the application context <resource>
What it means
SpringDmnConfigurationHelper.buildDmnEngine(URL) boots a GenericXmlApplicationContext from the given XML resource and looks up beans of type DmnEngine. If the Spring context contains no DmnEngine bean, it throws FlowableException stating no org.flowable.dmn.engine.DmnEngine is defined in that application context.
Source
Thrown at modules/flowable-dmn-spring/src/main/java/org/flowable/dmn/spring/SpringDmnConfigurationHelper.java:39
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.GenericXmlApplicationContext;
import org.springframework.core.io.UrlResource;
/**
* @author Tom Baeyens
*/
public class SpringDmnConfigurationHelper {
private static final Logger LOGGER = LoggerFactory.getLogger(SpringDmnConfigurationHelper.class);
public static DmnEngine buildDmnEngine(URL resource) {
LOGGER.debug("==== BUILDING SPRING APPLICATION CONTEXT AND DMN ENGINE =========================================");
try (GenericXmlApplicationContext applicationContext = new GenericXmlApplicationContext(new UrlResource(resource))) {
Map<String, DmnEngine> beansOfType = applicationContext.getBeansOfType(DmnEngine.class);
if ((beansOfType == null) || beansOfType.isEmpty()) {
throw new FlowableException("no " + DmnEngine.class.getName() + " defined in the application context " + resource);
}
DmnEngine dmnEngine = beansOfType.values().iterator().next();
LOGGER.debug("==== SPRING DMN ENGINE CREATED ==================================================================");
return dmnEngine;
}
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Add a DmnEngine bean to the XML, e.g. <bean id="dmnEngine" class="org.flowable.dmn.spring.DmnEngineFactoryBean"><property name="dmnEngineConfiguration" ref="dmnEngineConfig"/></bean> with a matching SpringDmnEngineConfiguration bean.
- Verify the URL points at the intended DMN Spring context file and the file loaded without errors (check context startup logs).
- Confirm the bean's class actually implements org.flowable.dmn.engine.DmnEngine.
- Alternatively construct the engine programmatically from a SpringDmnEngineConfiguration instead of via XML helper.
Example fix
// before (dmn-spring.xml has only a datasource bean, no engine bean) DmnEngine engine = SpringDmnConfigurationHelper.buildDmnEngine(url); // after (dmn-spring.xml adds) // <bean id="dmnEngineConfig" class="org.flowable.dmn.spring.SpringDmnEngineConfiguration">...</bean> // <bean id="dmnEngine" class="org.flowable.dmn.spring.DmnEngineFactoryBean" p:dmnEngineConfiguration-ref="dmnEngineConfig"/> DmnEngine engine = SpringDmnConfigurationHelper.buildDmnEngine(url);
Defensive patterns
Strategy: validation
Validate before calling
GenericXmlApplicationContext ctx = new GenericXmlApplicationContext(new UrlResource(resource)); if (ctx.getBeansOfType(DmnEngine.class).isEmpty()) throw new IllegalStateException(resource + ' defines no DmnEngine bean');
Try / catch
try { return SpringDmnConfigurationHelper.buildDmnEngine(resource); }
catch (FlowableException e) { throw new IllegalStateException('Spring XML must define a DmnEngine bean: ' + resource, e); } Prevention
- Keep a dedicated DMN Spring context defining a DmnEngineFactoryBean bean
- Check context startup logs for bean definition errors
- Verify the bean class implements org.flowable.dmn.engine.DmnEngine
- Prefer programmatic SpringDmnEngineConfiguration over XML helpers
When it happens
Trigger: Calling buildDmnEngine with a Spring XML resource that defines no bean of type DmnEngine (e.g. only other beans, wrong namespace, or a bean of a different engine type).
Common situations: Passing a generic Spring XML config (applicationContext.xml with no engine bean), pointing at a BPMN engine context instead of a DMN one, bean defined with a class that fails to instantiate or isn't a DmnEngine, or a typo in the bean class name in XML.
Understand the failure class
Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.
Related errors
- couldn't initialize dmn engine from spring configuration res
- no org.flowable.app.engine.AppEngine defined in the applicat
- transactionManager is required property for SpringAppEngineC
- couldn't initialize app engine from spring configuration res
- couldn't initialize cmmn engine from spring configuration re
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/cb3e36c2eb83f090.
Report an issue: GitHub.