{"record":{"id":"3e1e025d3bd0a3d2","repo":"flowable/flowable-engine","slug":"problem-retrieving-flowable-cmmn-cfg-xml-resources","errorCode":null,"errorMessage":"problem retrieving flowable.cmmn.cfg.xml resources on the classpath: {java.class.path}","messagePattern":"problem retrieving flowable\\.cmmn\\.cfg\\.xml resources on the classpath: (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/CmmnEngines.java","lineNumber":62,"sourceCode":"    protected static Map<String, EngineInfo> cmmnEngineInfosByResourceUrl = new HashMap<>();\n    protected static List<EngineInfo> cmmnEngineInfos = new ArrayList<>();\n\n    /**\n     * 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\n     * configuration).\n     */\n    public static synchronized void init() {\n        if (!isInitialized()) {\n            if (cmmnEngines == null) {\n                // Create new map to store CMMN engines if current map is null\n                cmmnEngines = new HashMap<>();\n            }\n            ClassLoader classLoader = CmmnEngines.class.getClassLoader();\n            Enumeration<URL> resources = null;\n            try {\n                resources = classLoader.getResources(\"flowable.cmmn.cfg.xml\");\n            } catch (IOException e) {\n                throw new FlowableException(\"problem retrieving flowable.cmmn.cfg.xml resources on the classpath: \" + System.getProperty(\"java.class.path\"), e);\n            }\n\n            // Remove duplicated configuration URL's using set. Some\n            // classloaders may return identical URL's twice, causing duplicate startups\n            Set<URL> configUrls = new HashSet<>();\n            while (resources.hasMoreElements()) {\n                configUrls.add(resources.nextElement());\n            }\n            for (URL resource : configUrls) {\n                LOGGER.info(\"Initializing cmmn engine using configuration '{}'\", resource);\n                initCmmnEngineFromResource(resource);\n            }\n\n            try {\n                resources = classLoader.getResources(\"flowable-cmmn-context.xml\");\n            } catch (IOException e) {\n                throw new FlowableException(\"problem retrieving flowable-cmmn-context.xml resources on the classpath: \" + System.getProperty(\"java.class.path\"), e);\n            }","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/CmmnEngines.java#L44-L80","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Inspect java.class.path (included in the message) and validate every entry opens correctly (jar tf / file readability)","Rebuild/redeploy the application or container image to replace corrupted jars","Initialize the engine programmatically (new CmmnEngineConfiguration().buildEngine()) to bypass classpath config scanning","Fix or replace the custom ClassLoader; test getResources(\"flowable.cmmn.cfg.xml\") in isolation"],"exampleFix":"// before\nCmmnEngines.init(); // classpath scan fails on a corrupt jar\n\n// after\nCmmnEngine cmmnEngine = new CmmnEngineConfiguration().buildEngine();\nCmmnEngines.registerEngine(cmmnEngine);","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    CmmnEngines.init();\n} catch (FlowableException e) {\n    if (e.getMessage().contains(\"problem retrieving flowable.cmmn.cfg.xml\")) {\n        // fall back to programmatic engine build\n        CmmnEngine engine = new CmmnEngineConfiguration().buildEngine();\n    } else { throw e; }\n}","preventionTips":["Verify classpath integrity (all jars open) in CI before deploy","Avoid corrupted artifacts in container images (checksum-verify builds)","Prefer explicit programmatic engine configuration in complex classloader environments"],"tags":["cmmn","classpath","initialization","io"],"backgroundTag":"file-read-failed","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}