{"record":{"id":"e7aef48186d93e58","repo":"flowable/flowable-engine","slug":"problem-retrieving-flowable-cmmn-context-xml-resou","errorCode":null,"errorMessage":"problem retrieving flowable-cmmn-context.xml resources on the classpath: {java.class.path}","messagePattern":"problem retrieving flowable-cmmn-context\\.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":79,"sourceCode":"            } 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            }\n\n            while (resources.hasMoreElements()) {\n                URL resource = resources.nextElement();\n                LOGGER.info(\"Initializing cmmn engine using Spring configuration '{}'\", resource);\n                initCmmnEngineFromSpringResource(resource);\n            }\n\n            setInitialized(true);\n        } else {\n            LOGGER.info(\"Cmmn engines already initialized\");\n        }\n    }\n\n    protected static void initCmmnEngineFromSpringResource(URL resource) {\n        try {\n            Class<?> springConfigurationHelperClass = ReflectUtil.loadClass(\"org.flowable.cmmn.spring.SpringCmmnConfigurationHelper\");\n            Method method = springConfigurationHelperClass.getDeclaredMethod(\"buildCmmnEngine\", new Class<?>[] { URL.class });","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/CmmnEngines.java#L61-L97","documentation":"Thrown by CmmnEngines.init when enumerating flowable-cmmn-context.xml Spring configuration resources on the classpath fails with an IOException. The engine cannot complete auto-discovery of Spring-based configurations.","triggerScenarios":"classLoader.getResources(\"flowable-cmmn-context.xml\") throws IOException during engine init — caused by unreadable classpath entries, broken jars, or failing classloaders; the IOException is wrapped in the FlowableException.","commonSituations":"App-server classloader issues when scanning Spring context XMLs; corrupt deployment artifacts; restrictive container/filesystem permissions making jars unreadable at runtime.","solutions":["Check java.class.path entries for unreadable/corrupt artifacts and redeploy","Remove unused flowable-cmmn-context.xml files or the broken jars causing the scan to fail","Initialize the CMMN engine programmatically or via an explicit Spring bean instead of classpath auto-discovery","Verify with a minimal test that CmmnEngines.class.getClassLoader().getResources(\"flowable-cmmn-context.xml\") works in the target environment"],"exampleFix":"// before\nCmmnEngines.init(); // fails scanning flowable-cmmn-context.xml\n\n// after\nClassPathXmlApplicationContext ctx =\n    new ClassPathXmlApplicationContext(\"flowable-cmmn-context.xml\");\nCmmnEngine engine = ctx.getBean(CmmnEngine.class);","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-context.xml\")) {\n        // initialize via explicit Spring context or programmatic config instead\n    } else { throw e; }\n}","preventionTips":["Keep classpath scan targets (flowable-cmmn-context.xml) minimal and valid","Test engine auto-init inside the real app-server/container classloader","Use explicit Spring bean wiring rather than classpath auto-discovery"],"tags":["cmmn","classpath","spring","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-14T05:17:10.506Z"}