{"record":{"id":"cfbe33318ee6184c","repo":"flowable/flowable-engine","slug":"problem-retrieving-flowable-idm-context-xml-resour","errorCode":null,"errorMessage":"problem retrieving flowable-idm-context.xml resources on the classpath: ${java.class.path}","messagePattern":"problem retrieving flowable-idm-context\\.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":80,"sourceCode":"            } 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            }\n\n            while (resources.hasMoreElements()) {\n                URL resource = resources.nextElement();\n                LOGGER.info(\"Initializing idm engine using Spring configuration '{}'\", resource);\n                initIdmEngineFromSpringResource(resource);\n            }\n\n            setInitialized(true);\n        } else {\n            LOGGER.info(\"Idm engines already initialized\");\n        }\n    }\n\n    protected static void initIdmEngineFromSpringResource(URL resource) {\n        try {\n            Class<?> springConfigurationHelperClass = ReflectUtil.loadClass(\"org.flowable.idm.spring.SpringIdmConfigurationHelper\");\n            Method method = springConfigurationHelperClass.getDeclaredMethod(\"buildIdmEngine\", new Class<?>[]{URL.class});","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/IdmEngines.java#L62-L98","documentation":"As the second step of IdmEngines.init(), the engine enumerates 'flowable-idm-context.xml' Spring context resources from the classpath. An IOException from ClassLoader.getResources is wrapped in this FlowableException including the java.class.path property. Same class as 3017 but for the Spring context descriptor rather than the main configuration file.","triggerScenarios":"ClassLoader.getResources(\"flowable-idm-context.xml\") throwing IOException during engine bootstrap, after the idm.cfg.xml scan has already succeeded.","commonSituations":"Same environmental classloader problems as the cfg.xml scan: restricted app-server classloaders, corrupted classpath entries, custom classloader that throws on getResources.","solutions":["Fix the classpath/classloader problem indicated by java.class.path in the message.","Initialize the engine programmatically to avoid resource scanning.","Check for a custom classloader override (e.g. OSGi, shaded fat jar) that mishandles getResources and repair or replace it."],"exampleFix":"// before\nIdmEngines.init(); // scans flowable-idm-context.xml\n\n// after\nnew IdmEngineConfiguration().buildIdmEngine(); // explicit construction, no scanning","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    IdmEngines.init();\n} catch (FlowableException e) {\n    if (e.getMessage().contains(\"flowable-idm-context.xml\")) {\n        logger.error(\"Spring context resource scan failed\", e.getCause());\n    }\n}","preventionTips":["Test ClassLoader.getResources(\"flowable-idm-context.xml\") in your target environment.","Avoid custom classloaders that throw on getResources; prefer programmatic engine construction there."],"tags":["classpath","engine-init","idm","spring","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-14T05:17:10.506Z"}