{"record":{"id":"846329d7bf38cbdb","repo":"flowable/flowable-engine","slug":"problem-retrieving-flowable-registry-context-xml-r","errorCode":null,"errorMessage":"problem retrieving flowable-registry-context.xml resources on the classpath: ","messagePattern":"problem retrieving flowable-registry-context\\.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":79,"sourceCode":"            } 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            }\n\n            while (resources.hasMoreElements()) {\n                URL resource = resources.nextElement();\n                LOGGER.info(\"Initializing event registry engine using Spring configuration '{}'\", resource);\n                initEventRegistryEngineFromSpringResource(resource);\n            }\n\n            setInitialized(true);\n        } else {\n            LOGGER.info(\"Event registry engines already initialized\");\n        }\n    }\n\n    protected static void initEventRegistryEngineFromSpringResource(URL resource) {\n        try {\n            Class<?> springConfigurationHelperClass = ReflectUtil.loadClass(\"org.flowable.eventregistry.impl.spring.SpringEventRegistryConfigurationHelper\");\n            Method method = springConfigurationHelperClass.getDeclaredMethod(\"buildEventRegistryEngine\", new Class<?>[] { URL.class });","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventRegistryEngines.java#L61-L97","documentation":"EventRegistryEngines.init() also enumerates flowable-eventregistry-context.xml Spring-configuration resources to initialize the engine from Spring beans. An IOException from classLoader.getResources is wrapped in a FlowableException with the classpath appended. As with the cfg.xml case, this reflects a classpath I/O failure during engine bootstrap, not a missing resource.","triggerScenarios":"Engine initialization (EventRegistryEngines.init, reached via getAppEngine) when getResources('flowable-eventregistry-context.xml') throws IOException due to damaged classpath entries or failing classloaders.","commonSituations":"Spring integration setups where the context resource scan fails because of corrupt jars on the classpath, restricted security managers, or custom classloaders that throw on enumeration.","solutions":["Validate all classpath entries listed in the message and fix or remove corrupt/unreadable ones.","Re-deploy or rebuild the artifact to restore intact jars.","If using a custom classloader, ensure getResources works for this resource name and protocol.","Check Java security policy if a SecurityManager might block resource enumeration."],"exampleFix":"// before\nclasspath contains truncated spring-context resource jar\n// after\nverify with: jar tf libs/app-spring.jar | grep flowable-eventregistry-context.xml\nrebuild: mvn clean install","handlingStrategy":"try-catch","validationCode":"URL res = getClass().getClassLoader().getResource(\"flowable-eventregistry-context.xml\");\nif (res == null) log.warn(\"No flowable-eventregistry-context.xml on classpath (Spring init will be skipped)\");","typeGuard":null,"tryCatchPattern":"try {\n    EventRegistryEngines.getAppEngine();\n} catch (FlowableException e) {\n    if (e.getMessage().startsWith(\"problem retrieving flowable-registry-context.xml\")) {\n        log.error(\"Classpath I/O failure during Spring resource scan: \" + e.getMessage(), e);\n    }\n    throw e;\n}","preventionTips":["Verify jars are intact after build/deploy","Check classloader behavior when using custom loaders or OSGi","Validate classpath entries in startup health checks","Rebuild artifacts rather than patching deployed jars"],"tags":["classpath","engine-init","spring","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"}