flowable/flowable-engine · error · FlowableException
couldn't initialize dmn engine from spring configuration res
Error message
couldn't initialize dmn engine from spring configuration resource " + resource + ": " + e.getMessage()
What it means
When a flowable-dmn-context.xml Spring resource is found, DmnEngines.initDmnEngineFromSpringResource builds the engine from that Spring configuration. Any exception during that process is wrapped in this FlowableException including the resource name and e.getMessage(), so the DMN engine could not be initialized from Spring config.
Source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/DmnEngines.java:108
setInitialized(true);
} else {
LOGGER.info("DMN engines already initialized");
}
}
protected static void initDmnEngineFromSpringResource(URL resource) {
try {
Class<?> springConfigurationHelperClass = ReflectUtil.loadClass("org.flowable.dmn.spring.SpringDmnConfigurationHelper");
Method method = springConfigurationHelperClass.getDeclaredMethod("buildDmnEngine", new Class<?>[] { URL.class });
DmnEngine dmnEngine = (DmnEngine) method.invoke(null, new Object[] { resource });
String dmnEngineName = dmnEngine.getName();
EngineInfo dmnEngineInfo = new EngineInfo(dmnEngineName, resource.toString(), null);
dmnEngineInfosByName.put(dmnEngineName, dmnEngineInfo);
dmnEngineInfosByResourceUrl.put(resource.toString(), dmnEngineInfo);
} catch (Exception e) {
throw new FlowableException("couldn't initialize dmn engine from spring configuration resource " + resource + ": " + e.getMessage(), e);
}
}
/**
* Registers the given dmn engine. No {@link EngineInfo} will be available for this dmn engine. An engine that is registered will be closed when the {@link DmnEngines#destroy()} is called.
*/
public static void registerDmnEngine(DmnEngine dmnEngine) {
dmnEngines.put(dmnEngine.getName(), dmnEngine);
}
/**
* Unregisters the given dmn engine.
*/
public static void unregister(DmnEngine dmnEngine) {
dmnEngines.remove(dmnEngine.getName());
}
private static EngineInfo initDmnEngineFromResource(URL resourceUrl) {View on GitHub (pinned to d6d39ce1c6)
Solutions
- Read the wrapped cause 'e' for the real Spring failure (XML parse, ClassNotFound, bean init).
- Validate the flowable-dmn-context.xml is well-formed and its beans reference existing classes/properties.
- Ensure Spring (spring-context/beans) and flowable-dmn-engine jars are on the classpath.
- Check bean property values against the DMN engine version's API (rename outdated setters).
Example fix
// before (context XML) <bean id="dmnEngineConfiguration" class="org.flowable.dmn.engine.OldCfg"/> // after <bean id="dmnEngineConfiguration" class="org.flowable.dmn.engine.DmnEngineConfiguration"/> <bean id="dmnEngine" factory-bean="dmnEngineConfiguration" factory-method="buildDmnEngine"/>
Defensive patterns
Strategy: try-catch
Validate before calling
// Validate the Spring resource parses and beans resolve before init
new ClassPathXmlApplicationContext("flowable-dmn-context.xml").close(); // throws early on bad config Try / catch
try { DmnEngine engine = DmnEngines.getDmnEngine(); } catch (FlowableException e) {
if (e.getMessage().startsWith("couldn't initialize dmn engine from spring configuration resource")) { log.error("Spring config failure: {}", e.getCause(), e); }
throw e;
} Prevention
- Keep flowable-dmn-context.xml in version control and schema-validated
- Reference only classes present in the DMN engine version in use
- Test Spring context loading in unit tests
- Always inspect the wrapped cause 'e' for the real error
When it happens
Trigger: DmnEngines.init() encountering a flowable-dmn-context.xml whose Spring bean definitions fail to load or produce a DMN engine (bad bean class, XML parse error, missing beans, bean init exception).
Common situations: Hand-edited Spring context XML referencing classes not on the classpath, invalid XML syntax, version mismatch between the context file's bean classes and the DMN engine API, missing Spring dependencies.
Related errors
- no " + CmmnEngine.class.getName() + " defined in the applica
- DmnEngineConfiguration is required
- problem retrieving flowable-dmn-context.xml resources on the
- no org.flowable.dmn.engine.DmnEngine defined in the applicat
- no org.flowable.app.engine.AppEngine defined in the applicat
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/3ff78672ca67406d.
Report an issue: GitHub.