{"record":{"id":"7217cbd144cbae40","repo":"flowable/flowable-engine","slug":"invalid-url-resourceurl-7217cb","errorCode":null,"errorMessage":"invalid url: ${resourceUrl}","messagePattern":"invalid url: (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/IdmEngines.java","lineNumber":210,"sourceCode":"     *\n     * @param idmEngineName is the name of the idm engine or null for the default idm engine.\n     */\n    public static IdmEngine getIdmEngine(String idmEngineName) {\n        if (!isInitialized()) {\n            init();\n        }\n        return idmEngines.get(idmEngineName);\n    }\n\n    /**\n     * retries to initialize a idm engine that previously failed.\n     */\n    public static EngineInfo retry(String resourceUrl) {\n        LOGGER.debug(\"retying initializing of resource {}\", resourceUrl);\n        try {\n            return initIdmEngineFromResource(new URL(resourceUrl));\n        } catch (MalformedURLException e) {\n            throw new FlowableException(\"invalid url: \" + resourceUrl, e);\n        }\n    }\n\n    /**\n     * provides access to idm engine to application clients in a managed server environment.\n     */\n    public static Map<String, IdmEngine> getIdmEngines() {\n        return idmEngines;\n    }\n\n    /**\n     * closes all idm engines. This method should be called when the server shuts down.\n     */\n    public static synchronized void destroy() {\n        if (isInitialized()) {\n            Map<String, IdmEngine> engines = new HashMap<>(idmEngines);\n            idmEngines = new HashMap<>();\n","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/IdmEngines.java#L192-L228","documentation":"Thrown by IdmEngines.retry(String resourceUrl) when the stored resource URL string cannot be parsed into a java.net.URL (MalformedURLException). Flowable wraps it in a FlowableException with the offending URL in the message.","triggerScenarios":"Calling IdmEngines.retry(resourceUrl) with a URL string that is malformed — missing protocol, illegal characters, or a scheme the URL handler does not support.","commonSituations":"A corrupted or hand-edited EngineInfo resourceUrl (e.g. saved without the 'file:' or 'jar:' prefix), URL with spaces or unencoded special characters, environment-specific config substitution producing a bad scheme.","solutions":["Print/inspect the resourceUrl string and fix its format (must include a valid protocol, e.g. file:/path/to/flowable.idm.cfg.xml).","Validate the URL with new URL(resourceUrl) in a try/catch before calling retry, or sanitize/encode it.","If the URL came from a saved EngineInfo, re-derive it from the actual resource location instead of trusting the stored string.","URL-encode spaces and special characters in file paths."],"exampleFix":"// before\nEngineInfo info = IdmEngines.retry(\"/app/config/flowable.idm.cfg.xml\"); // no protocol\n// after\nEngineInfo info = IdmEngines.retry(\"file:/app/config/flowable.idm.cfg.xml\");","handlingStrategy":"validation","validationCode":"boolean valid;\ntry { new URL(resourceUrl); valid = true; } catch (MalformedURLException e) { valid = false; }\nif (!valid) throw new IllegalArgumentException(\"Not a valid URL: \" + resourceUrl);","typeGuard":null,"tryCatchPattern":"try {\n    EngineInfo info = IdmEngines.retry(resourceUrl);\n} catch (FlowableException e) {\n    LOG.error(\"Malformed engine resource URL: {}\", resourceUrl, e.getCause());\n    throw new ConfigurationException(\"Invalid engine resource URL\", e);\n}","preventionTips":["Always store resource URLs with an explicit protocol (file:, jar:, etc.).","URL-encode paths containing spaces or special characters.","Validate URL strings with new URL(...) before persisting or retrying.","Prefer obtaining the URL from ClassLoader.getResource over hand-building strings."],"tags":["url","engine-bootstrap","configuration"],"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-14T05:17:10.506Z"}