{"record":{"id":"53398534a87f68ad","repo":"flowable/flowable-engine","slug":"invalid-url-resourceurl","errorCode":null,"errorMessage":"invalid url: <resourceUrl>","messagePattern":"invalid url: <resourceUrl>","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-app-engine/src/main/java/org/flowable/app/engine/AppEngines.java","lineNumber":204,"sourceCode":"     * @param appEngineName\n     *            is the name of the app engine or null for the default app engine.\n     */\n    public static AppEngine getAppEngine(String appEngineName) {\n        if (!isInitialized()) {\n            init();\n        }\n        return appEngines.get(appEngineName);\n    }\n\n    /**\n     * retries to initialize an app engine that previously failed.\n     */\n    public static EngineInfo retry(String resourceUrl) {\n        LOGGER.debug(\"retying initializing of resource {}\", resourceUrl);\n        try {\n            return initAppEngineFromResource(new URL(resourceUrl));\n        } catch (MalformedURLException e) {\n            throw new FlowableException(\"invalid url: \" + resourceUrl, e);\n        }\n    }\n\n    /**\n     * provides access to app engine to application clients in a managed server environment.\n     */\n    public static Map<String, AppEngine> getAppEngines() {\n        return appEngines;\n    }\n\n    /**\n     * closes all app engines. This method should be called when the server shuts down.\n     */\n    public static synchronized void destroy() {\n        if (isInitialized()) {\n            Map<String, AppEngine> engines = new HashMap<>(appEngines);\n            appEngines = new HashMap<>();\n","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/AppEngines.java#L186-L222","documentation":"AppEngines.retry(resourceUrl) re-initializes an engine from a previously discovered resource URL string. If the string cannot be parsed into a java.net.URL (MalformedURLException), retry throws this FlowableException. It indicates the resourceUrl argument is not a valid URL.","triggerScenarios":"Calling AppEngines.retry(\"some-string\") where the string is not an absolute, well-formed URL (e.g. a plain file path, empty string, or a resource name instead of the URL stored in EngineInfo.getResourceUrl()).","commonSituations":"Passing an engine name or file path instead of the URL from EngineInfo;手工 editing stored URLs; losing the URL scheme (file:/jar:) when persisting engine info.","solutions":["Pass exactly the value returned by EngineInfo.getResourceUrl(), not a file path or engine name.","Ensure the string is absolute and includes a scheme (file:, jar:, etc.).","Prepend \"file:\" if you have a plain absolute filesystem path you intend to use as a URL.","Get the list of valid URLs from AppEngines.getAppEngineInfos() and retry one of those."],"exampleFix":"// before\nAppEngines.retry(\"flowable.app.cfg.xml\");\n// after\nAppEngines.retry(info.getResourceUrl()); // e.g. \"file:/app/config/flowable.app.cfg.xml\"","handlingStrategy":"validation","validationCode":"private static boolean isValidUrl(String s) {\n    try { new URL(s); return true; } catch (MalformedURLException e) { return false; }\n}\n// call: if (isValidUrl(resourceUrl)) AppEngines.retry(resourceUrl);","typeGuard":"static boolean isAbsoluteUrl(String s) { return s != null && s.matches(\"^[a-zA-Z][a-zA-Z0-9+.-]*:.*\"); }","tryCatchPattern":"try { AppEngines.retry(resourceUrl); } catch (FlowableException e) {\n    log.error(\"Not a valid URL: \" + resourceUrl, e);\n}","preventionTips":["Always pass EngineInfo.getResourceUrl() values","Never store engine info URLs without their scheme","Use getAppEngineInfos() to enumerate valid retry targets"],"tags":["url","invalid-argument","engine-init"],"backgroundTag":"invalid-url-format","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}