{"record":{"id":"7986ffc50ae9bdf1","repo":"flowable/flowable-engine","slug":"problem-retrieving-flowable-app-cfg-xml-resources","errorCode":null,"errorMessage":"problem retrieving flowable.app.cfg.xml resources on the classpath: <java.class.path>","messagePattern":"problem retrieving flowable\\.app\\.cfg\\.xml resources on the classpath: <java\\.class\\.path>","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-app-engine/src/main/java/org/flowable/app/engine/AppEngines.java","lineNumber":62,"sourceCode":"    protected static Map<String, EngineInfo> appEngineInfosByResourceUrl = new HashMap<>();\n    protected static List<EngineInfo> appEngineInfos = new ArrayList<>();\n\n    /**\n     * Initializes all App engines that can be found on the classpath for resources <code>flowable.app.cfg.xml</code> and for resources <code>flowable-app-context.xml</code> (Spring style\n     * configuration).\n     */\n    public static synchronized void init() {\n        if (!isInitialized()) {\n            if (appEngines == null) {\n                // Create new map to store App engines if current map is null\n                appEngines = new HashMap<>();\n            }\n            ClassLoader classLoader = AppEngines.class.getClassLoader();\n            Enumeration<URL> resources = null;\n            try {\n                resources = classLoader.getResources(\"flowable.app.cfg.xml\");\n            } catch (IOException e) {\n                throw new FlowableException(\"problem retrieving flowable.app.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 app engine using configuration '{}'\", resource);\n                initAppEngineFromResource(resource);\n            }\n\n            try {\n                resources = classLoader.getResources(\"flowable-app-context.xml\");\n            } catch (IOException e) {\n                throw new FlowableException(\"problem retrieving flowable-app-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-app-engine/src/main/java/org/flowable/app/engine/AppEngines.java#L44-L80","documentation":"AppEngines.init() discovers flowable.app.cfg.xml files via the classloader. If ClassLoader.getResources throws an IOException during this lookup, init aborts with this FlowableException, embedding the current java.class.path to aid diagnosis. It indicates a broken classpath/classloader rather than a missing config file.","triggerScenarios":"Calling AppEngines.getAppEngine() (which triggers init) while the classloader's resource enumeration of flowable.app.cfg.xml fails with IOException.","commonSituations":"Exotic classloader environments (app servers, OSGi, custom classloaders), corrupted java.class.path entries, or filesystem errors when scanning classpath URLs.","solutions":["Inspect java.class.path in the message for malformed/nonexistent entries and fix the classpath.","Check the wrapped IOException cause for the underlying filesystem/classloader failure.","Prefer building the engine explicitly via AppEngineConfiguration instead of classpath auto-discovery.","Verify classloader behavior in the container; use the app server's standard shared-library mechanism."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// verify classpath health before engine init\nfor (String entry : System.getProperty(\"java.class.path\").split(File.pathSeparator)) {\n    if (!new File(entry).exists()) { log.warn(\"Bad classpath entry: \" + entry); }\n}","typeGuard":null,"tryCatchPattern":"try { AppEngines.getAppEngine(\"default\"); } catch (FlowableException e) {\n    log.error(\"App engine init failed: \" + e.getMessage(), e);\n}","preventionTips":["Keep java.class.path entries valid and absolute","Avoid custom classloaders that break getResources()","Prefer explicit AppEngineConfiguration creation over auto-discovery","Log the full cause chain at startup"],"tags":["classpath","engine-init","resource-discovery"],"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"}