flowable/flowable-engine · error · FlowableException

problem retrieving flowable.cmmn.cfg.xml resources on the cl

Error message

problem retrieving flowable.cmmn.cfg.xml resources on the classpath: {java.class.path}

What it means

Thrown by CmmnEngines.init when enumerating flowable.cmmn.cfg.xml resources on the classpath fails with an IOException. ClassLoader.getResources cannot be read, so engine auto-initialization from configuration files cannot proceed.

Source

Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/CmmnEngines.java:62

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

    /**
     * Initializes all CMMN engines that can be found on the classpath for resources <code>flowable.cmmn.cfg.xml</code> and for resources <code>flowable-cmmn-context.xml</code> (Spring style
     * configuration).
     */
    public static synchronized void init() {
        if (!isInitialized()) {
            if (cmmnEngines == null) {
                // Create new map to store CMMN engines if current map is null
                cmmnEngines = new HashMap<>();
            }
            ClassLoader classLoader = CmmnEngines.class.getClassLoader();
            Enumeration<URL> resources = null;
            try {
                resources = classLoader.getResources("flowable.cmmn.cfg.xml");
            } catch (IOException e) {
                throw new FlowableException("problem retrieving flowable.cmmn.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 (URL resource : configUrls) {
                LOGGER.info("Initializing cmmn engine using configuration '{}'", resource);
                initCmmnEngineFromResource(resource);
            }

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

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Inspect java.class.path (included in the message) and validate every entry opens correctly (jar tf / file readability)
  2. Rebuild/redeploy the application or container image to replace corrupted jars
  3. Initialize the engine programmatically (new CmmnEngineConfiguration().buildEngine()) to bypass classpath config scanning
  4. Fix or replace the custom ClassLoader; test getResources("flowable.cmmn.cfg.xml") in isolation

Example fix

// before
CmmnEngines.init(); // classpath scan fails on a corrupt jar

// after
CmmnEngine cmmnEngine = new CmmnEngineConfiguration().buildEngine();
CmmnEngines.registerEngine(cmmnEngine);
Defensive patterns

Strategy: try-catch

Try / catch

try {
    CmmnEngines.init();
} catch (FlowableException e) {
    if (e.getMessage().contains("problem retrieving flowable.cmmn.cfg.xml")) {
        // fall back to programmatic engine build
        CmmnEngine engine = new CmmnEngineConfiguration().buildEngine();
    } else { throw e; }
}

Prevention

When it happens

Trigger: classLoader.getResources("flowable.cmmn.cfg.xml") throws IOException — usually a broken/unreadable classpath entry, a jar that can't be opened, or a failing custom ClassLoader, wrapping the original IOException.

Common situations: Corrupt jar or classpath directory in java.class.path; nested/fat-jar classloader quirks (Spring Boot, app servers); container image with unreadable jars; custom classloader that throws on resource lookup.

Understand the failure class

Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.

Related errors


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