{"record":{"id":"38982c9fc47dd6a0","repo":"flowable/flowable-engine","slug":"problem-retrieving-flowable-dmn-cfg-xml-resources","errorCode":null,"errorMessage":"problem retrieving flowable.dmn.cfg.xml resources on the classpath: \" + System.getProperty(\"java.class.path\")","messagePattern":"problem retrieving flowable\\.dmn\\.cfg\\.xml resources on the classpath: \" \\+ System\\.getProperty\\(\"java\\.class\\.path\"\\)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/DmnEngines.java","lineNumber":63,"sourceCode":"    protected static Map<String, EngineInfo> dmnEngineInfosByResourceUrl = new HashMap<>();\n    protected static List<EngineInfo> dmnEngineInfos = new ArrayList<>();\n\n    /**\n     * 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\n     * configuration).\n     */\n    public static synchronized void init() {\n        if (!isInitialized()) {\n            if (dmnEngines == null) {\n                // Create new map to store dmn engines if current map is null\n                dmnEngines = new HashMap<>();\n            }\n            ClassLoader classLoader = DmnEngines.class.getClassLoader();\n            Enumeration<URL> resources = null;\n            try {\n                resources = classLoader.getResources(\"flowable.dmn.cfg.xml\");\n            } catch (IOException e) {\n                throw new FlowableException(\"problem retrieving flowable.dmn.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 (Iterator<URL> iterator = configUrls.iterator(); iterator.hasNext();) {\n                URL resource = iterator.next();\n                LOGGER.info(\"Initializing dmn engine using configuration '{}'\", resource);\n                initDmnEngineFromResource(resource);\n            }\n\n            try {\n                resources = classLoader.getResources(\"flowable-dmn-context.xml\");\n            } catch (IOException e) {\n                throw new FlowableException(\"problem retrieving flowable-dmn-context.xml resources on the classpath: \" + System.getProperty(\"java.class.path\"), e);","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/DmnEngines.java#L45-L81","documentation":"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.","triggerScenarios":"First call to DmnEngines.getDmnEngine()/init when classLoader.getResources(\"flowable.dmn.cfg.xml\") throws IOException (classloader failure, closed classloader, broken classpath).","commonSituations":"Classloader problems in containers/app servers, corrupted or non-readable classpath entries, custom classloaders throwing during resource enumeration.","solutions":["Inspect the wrapped IOException cause for the exact classloader failure.","Verify the java.class.path printed in the message contains valid, readable entries.","Fix the environment's classloader (e.g. restart the container, correct TCCL setup) before engine init.","Avoid initializing DmnEngines from a closed/custom classloader."],"exampleFix":"// before: init inside a torn-down webapp classloader\nDmnEngines.getDmnEngine(); // IOException during getResources\n// after: initialize on the application classloader\nThread.currentThread().setContextClassLoader(appClassLoader);\nDmnEngines.getDmnEngine();","handlingStrategy":"try-catch","validationCode":"// Ensure classpath resources are enumerable before engine init\nEnumeration<URL> cfg = DmnEngines.class.getClassLoader().getResources(\"flowable.dmn.cfg.xml\");\n// proceed only if enumeration succeeds (no IOException)","typeGuard":null,"tryCatchPattern":"try { DmnEngine engine = DmnEngines.getDmnEngine(); } catch (FlowableException e) {\n    if (e.getMessage().startsWith(\"problem retrieving flowable.dmn.cfg.xml\")) { log.error(\"Classloader failure: {}\", e.getCause(), e); }\n    throw e;\n}","preventionTips":["Initialize engines once on the application classloader at startup","Keep classpath entries valid and readable","Avoid re-initializing engines from torn-down webapp classloaders"],"tags":["dmn","classpath","io","engine-bootstrap"],"backgroundTag":"module-init-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"}