{"record":{"id":"d22bef430bd63fc0","repo":"flowable/flowable-engine","slug":"invalid-url-resourceurl-d22bef","errorCode":null,"errorMessage":"invalid url: \" + resourceUrl","messagePattern":"invalid url: \" \\+ resourceUrl","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/DmnEngines.java","lineNumber":206,"sourceCode":"     * @param dmnEngineName\n     *            is the name of the dmn engine or null for the default dmn engine.\n     */\n    public static DmnEngine getDmnEngine(String dmnEngineName) {\n        if (!isInitialized()) {\n            init();\n        }\n        return dmnEngines.get(dmnEngineName);\n    }\n\n    /**\n     * retries to initialize a dmn engine that previously failed.\n     */\n    public static EngineInfo retry(String resourceUrl) {\n        LOGGER.debug(\"retying initializing of resource {}\", resourceUrl);\n        try {\n            return initDmnEngineFromResource(new URL(resourceUrl));\n        } catch (MalformedURLException e) {\n            throw new FlowableException(\"invalid url: \" + resourceUrl, e);\n        }\n    }\n\n    /**\n     * provides access to dmn engine to application clients in a managed server environment.\n     */\n    public static Map<String, DmnEngine> getDmnEngines() {\n        return dmnEngines;\n    }\n\n    /**\n     * closes all dmn engines. This method should be called when the server shuts down.\n     */\n    public static synchronized void destroy() {\n        if (isInitialized()) {\n            Map<String, DmnEngine> engines = new HashMap<>(dmnEngines);\n            dmnEngines = new HashMap<>();\n","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/DmnEngines.java#L188-L224","documentation":"DmnEngines.retry re-initializes the DMN engine from a stored resource URL string. If that string is not a syntactically valid URL, new URL(resourceUrl) throws MalformedURLException, which is rethrown as a FlowableException. It indicates the persisted engine resource URL is malformed.","triggerScenarios":"Calling DmnEngines.retry(String resourceUrl) with a string that is not a valid absolute URL, e.g. a bare classpath name like \"flowable.dmn.cfg.xml\" or a path with illegal characters/spaces.","commonSituations":"Passing a classpath-relative resource name instead of a full URL; URLs persisted in config with unencoded spaces; corrupted configuration from a previous failed init stored in EngineInfo.getException()/resourceUrl.","solutions":["Pass a full, valid absolute URL (e.g. file:/path/to/flowable.dmn.cfg.xml or the result of getResource().toString()).","If you only have a classpath resource name, convert it: new URL(ClassLoader.getSystemResource(name).toString()) or use initDmnEngineFromSpringResource instead.","URL-encode special characters (spaces, non-ASCII) in file paths before constructing the URL string.","Check where resourceUrl came from (EngineInfo / config) and correct the stored value."],"exampleFix":"// before\nEngineInfo info = DmnEngines.retry(\"flowable.dmn.cfg.xml\"); // not a URL\n\n// after\nURL url = DmnEngines.class.getClassLoader().getResource(\"flowable.dmn.cfg.xml\");\nEngineInfo info = DmnEngines.retry(url.toString());","handlingStrategy":"validation","validationCode":"try { new java.net.URL(resourceUrl); } catch (java.net.MalformedURLException e) {\n    throw new IllegalArgumentException(\"Not a valid URL: \" + resourceUrl, e);\n}","typeGuard":"null","tryCatchPattern":"try {\n    return DmnEngines.retry(resourceUrl);\n} catch (FlowableException e) {\n    LOGGER.error(\"Invalid resource URL for DMN retry: {}\", resourceUrl, e);\n    throw new IllegalArgumentException(\"resourceUrl must be an absolute URL\", e);\n}","preventionTips":["Always store resourceUrl from URL.toString(), never a raw classpath name","URL-encode file paths with spaces or special characters","Validate the URL format before persisting it in configuration"],"tags":["url","initialization","java"],"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-14T11:17:12.474Z"}