{"record":{"id":"3843786777b239cc","repo":"flowable/flowable-engine","slug":"problem-retrieving-flowable-registry-cfg-xml-resou","errorCode":null,"errorMessage":"problem retrieving flowable.registry.cfg.xml resources on the classpath: ","messagePattern":"problem retrieving flowable\\.registry\\.cfg\\.xml resources on the classpath: ","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"critical","filePath":"modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventRegistryEngines.java","lineNumber":62,"sourceCode":"    protected static Map<String, EngineInfo> eventRegistryEngineInfosByResourceUrl = new HashMap<>();\n    protected static List<EngineInfo> eventRegistryEngineInfos = new ArrayList<>();\n\n    /**\n     * Initializes all event registry engines that can be found on the classpath for resources <code>flowable.eventregistry.cfg.xml</code> \n     * and for resources <code>flowable-eventregistry-context.xml</code> (Spring style configuration).\n     */\n    public static synchronized void init() {\n        if (!isInitialized()) {\n            if (eventRegistryEngines == null) {\n                // Create new map to store event registry engines if current map is null\n                eventRegistryEngines = new HashMap<>();\n            }\n            ClassLoader classLoader = EventRegistryEngines.class.getClassLoader();\n            Enumeration<URL> resources = null;\n            try {\n                resources = classLoader.getResources(\"flowable.eventregistry.cfg.xml\");\n            } catch (IOException e) {\n                throw new FlowableException(\"problem retrieving flowable.registry.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 event registry engine using configuration '{}'\", resource);\n                initEventRegistryEngineFromResource(resource);\n            }\n\n            try {\n                resources = classLoader.getResources(\"flowable-eventregistry-context.xml\");\n            } catch (IOException e) {\n                throw new FlowableException(\"problem retrieving flowable-registry-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-event-registry/src/main/java/org/flowable/eventregistry/impl/EventRegistryEngines.java#L44-L80","documentation":"EventRegistryEngines.init() enumerates all flowable.eventregistry.cfg.xml resources on the classpath to auto-initialize the event registry engine. If the classloader's getResources call throws an IOException, it wraps it in a FlowableException including the java.class.path. This indicates a broken/classloader-level I/O problem, not a missing config file (missing files are simply skipped).","triggerScenarios":"Calling EventRegistryEngines.getAppEngine/init (directly or via building an engine) when the thread-context or class classloader throws IOException on getResources('flowable.eventregistry.cfg.xml') — e.g. corrupted jars, unreadable classpath entries, or exotic custom classloaders.","commonSituations":"Fat jars with corrupt/duplicate entries, classloader issues in app servers (OSGi, custom parent-last loaders), broken deployments where a classpath jar is truncated or unreadable.","solutions":["Inspect the java.class.path printed in the message and validate every entry (verify each jar with 'jar tf' or unzip -t); repair or re-deploy corrupt jars.","Rebuild the application artifact to regenerate a clean classpath.","Check the custom classloader in use and ensure it can enumerate resources for that URL protocol.","If running in a container, verify mounted volumes containing jars are readable."],"exampleFix":"// before (broken fat jar entry on classpath)\njava -cp app.jar:libs/corrupt-lib.jar com.app.Main\n// after\nmvn clean package && java -cp app.jar:libs/fixed-lib.jar com.app.Main","handlingStrategy":"try-catch","validationCode":"try (Stream<Path> entries = Files.list(Paths.get(libDir))) {\n    entries.filter(p -> p.toString().endsWith(\".jar\")).forEach(p -> {\n        try (java.util.jar.JarFile jf = new java.util.jar.JarFile(p.toFile())) { jf.getManifest(); }\n        catch (IOException e) { throw new IllegalStateException(\"Corrupt jar on classpath: \" + p, e); }\n    });\n}","typeGuard":null,"tryCatchPattern":"try {\n    EventRegistryEngines.getAppEngine();\n} catch (FlowableException e) {\n    if (e.getMessage().startsWith(\"problem retrieving flowable.registry.cfg.xml\")) {\n        log.error(\"Classpath corruption detected; inspect: \" + e.getMessage(), e);\n    }\n    throw e;\n}","preventionTips":["Verify artifacts (checksums) before deploying","Run 'jar tf' smoke checks in CI on packaged jars","Avoid hand-edited classpaths in launch scripts","Test engine bootstrap early in application startup"],"tags":["classpath","engine-init","io-error"],"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"}