{"record":{"id":"145da02cf82254ec","repo":"flowable/flowable-engine","slug":"problem-retrieving-flowable-idm-cfg-xml-resources","errorCode":null,"errorMessage":"problem retrieving flowable.idm.cfg.xml resources on the classpath: ${java.class.path}","messagePattern":"problem retrieving flowable\\.idm\\.cfg\\.xml resources on the classpath: (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/IdmEngines.java","lineNumber":63,"sourceCode":"    protected static Map<String, EngineInfo> idmEngineInfosByResourceUrl = new HashMap<>();\n    protected static List<EngineInfo> idmEngineInfos = new ArrayList<>();\n\n    /**\n     * Initializes all idm engines that can be found on the classpath for resources <code>flowable.idm.cfg.xml</code> and for resources <code>flowable-idm-context.xml</code> (Spring style\n     * configuration).\n     */\n    public static synchronized void init() {\n        if (!isInitialized()) {\n            if (idmEngines == null) {\n                // Create new map to store idm engines if current map is null\n                idmEngines = new HashMap<>();\n            }\n            ClassLoader classLoader = IdmEngines.class.getClassLoader();\n            Enumeration<URL> resources = null;\n            try {\n                resources = classLoader.getResources(\"flowable.idm.cfg.xml\");\n            } catch (IOException e) {\n                throw new FlowableException(\"problem retrieving flowable.idm.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 idm engine using configuration '{}'\", resource);\n                initIdmEngineFromResource(resource);\n            }\n\n            try {\n                resources = classLoader.getResources(\"flowable-idm-context.xml\");\n            } catch (IOException e) {\n                throw new FlowableException(\"problem retrieving flowable-idm-context.xml resources on the classpath: \" + System.getProperty(\"java.class.path\"), e);\n            }","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/IdmEngines.java#L45-L81","documentation":"During IdmEngines.init() the engine scans the classpath for 'flowable.idm.cfg.xml' configuration resources via ClassLoader.getResources. If the underlying I/O lookup fails with IOException, it is wrapped in this FlowableException which includes java.class.path to aid diagnosis. It signals a classloading/environment problem, not a missing config file.","triggerScenarios":"ClassLoader.getResources(\"flowable.idm.cfg.xml\") throwing IOException during engine bootstrap — typically broken classloader state, closed classloader, or classpath string issues in exotic launch environments.","commonSituations":"Application servers with restricted/odd classloaders; fat-jar launchers with malformed java.class.path; embedding the IDM engine in a container where the bootstrap classloader cannot enumerate resources.","solutions":["Inspect the java.class.path value in the exception message for malformed or duplicated entries and fix the launch configuration.","Verify the classloader used to bootstrap the engine is open and functional in your environment.","Instead of auto-discovery, build and register the IdmEngine programmatically (IdmEngineConfiguration.createIdmEngine... from a specific resource) to bypass classpath scanning."],"exampleFix":"// before\nIdmEngines.getDefaultIdmEngine(); // relies on classpath scanning\n\n// after\nIdmEngine engine = IdmEngineConfiguration.createDefaultIdmEngineConfiguration()\n    .setDataSource(dataSource)\n    .buildIdmEngine();","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    IdmEngines.init();\n} catch (FlowableException e) {\n    if (e.getMessage().contains(\"flowable.idm.cfg.xml\")) {\n        logger.error(\"Classpath scan failed, java.class.path={}\", System.getProperty(\"java.class.path\"), e.getCause());\n    }\n}","preventionTips":["Keep java.class.path well-formed; avoid duplicate or malformed entries in launcher scripts.","Prefer building the IdmEngine programmatically in constrained environments (app servers, containers).","Verify resource enumeration works in your classloader before engine startup."],"tags":["classpath","engine-init","idm","io"],"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-14T11:17:12.474Z"}