flowable/flowable-engine · error · FlowableException

problem retrieving flowable.dmn.cfg.xml resources on the cla

Error message

problem retrieving flowable.dmn.cfg.xml resources on the classpath: " + System.getProperty("java.class.path")

What it means

DmnEngines.init() builds the default DMN engine by scanning the classpath for flowable.dmn.cfg.xml resources. If enumerating those resources throws IOException, init wraps it in a FlowableException including the java.class.path to aid diagnosis. This happens before any engine exists.

Source

Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/DmnEngines.java:63

    protected static Map<String, EngineInfo> dmnEngineInfosByResourceUrl = new HashMap<>();
    protected static List<EngineInfo> dmnEngineInfos = new ArrayList<>();

    /**
     * Initializes all dmn engines that can be found on the classpath for resources <code>flowable.dmn.cfg.xml</code> and for resources <code>flowable-dmn-context.xml</code> (Spring style
     * configuration).
     */
    public static synchronized void init() {
        if (!isInitialized()) {
            if (dmnEngines == null) {
                // Create new map to store dmn engines if current map is null
                dmnEngines = new HashMap<>();
            }
            ClassLoader classLoader = DmnEngines.class.getClassLoader();
            Enumeration<URL> resources = null;
            try {
                resources = classLoader.getResources("flowable.dmn.cfg.xml");
            } catch (IOException e) {
                throw new FlowableException("problem retrieving flowable.dmn.cfg.xml resources on the classpath: " + System.getProperty("java.class.path"), e);
            }

            // Remove duplicated configuration URL's using set. Some
            // classloaders may return identical URL's twice, causing duplicate startups
            Set<URL> configUrls = new HashSet<>();
            while (resources.hasMoreElements()) {
                configUrls.add(resources.nextElement());
            }
            for (Iterator<URL> iterator = configUrls.iterator(); iterator.hasNext();) {
                URL resource = iterator.next();
                LOGGER.info("Initializing dmn engine using configuration '{}'", resource);
                initDmnEngineFromResource(resource);
            }

            try {
                resources = classLoader.getResources("flowable-dmn-context.xml");
            } catch (IOException e) {
                throw new FlowableException("problem retrieving flowable-dmn-context.xml resources on the classpath: " + System.getProperty("java.class.path"), e);

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Inspect the wrapped IOException cause for the exact classloader failure.
  2. Verify the java.class.path printed in the message contains valid, readable entries.
  3. Fix the environment's classloader (e.g. restart the container, correct TCCL setup) before engine init.
  4. Avoid initializing DmnEngines from a closed/custom classloader.

Example fix

// before: init inside a torn-down webapp classloader
DmnEngines.getDmnEngine(); // IOException during getResources
// after: initialize on the application classloader
Thread.currentThread().setContextClassLoader(appClassLoader);
DmnEngines.getDmnEngine();
Defensive patterns

Strategy: try-catch

Validate before calling

// Ensure classpath resources are enumerable before engine init
Enumeration<URL> cfg = DmnEngines.class.getClassLoader().getResources("flowable.dmn.cfg.xml");
// proceed only if enumeration succeeds (no IOException)

Try / catch

try { DmnEngine engine = DmnEngines.getDmnEngine(); } catch (FlowableException e) {
    if (e.getMessage().startsWith("problem retrieving flowable.dmn.cfg.xml")) { log.error("Classloader failure: {}", e.getCause(), e); }
    throw e;
}

Prevention

When it happens

Trigger: First call to DmnEngines.getDmnEngine()/init when classLoader.getResources("flowable.dmn.cfg.xml") throws IOException (classloader failure, closed classloader, broken classpath).

Common situations: Classloader problems in containers/app servers, corrupted or non-readable classpath entries, custom classloaders throwing during resource enumeration.

Related errors


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