flowable/flowable-engine · error · FlowableException

invalid url: ${resourceUrl}

Error message

invalid url: ${resourceUrl}

What it means

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.

Source

Thrown at modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/IdmEngines.java:210

     *
     * @param idmEngineName is the name of the idm engine or null for the default idm engine.
     */
    public static IdmEngine getIdmEngine(String idmEngineName) {
        if (!isInitialized()) {
            init();
        }
        return idmEngines.get(idmEngineName);
    }

    /**
     * retries to initialize a idm engine that previously failed.
     */
    public static EngineInfo retry(String resourceUrl) {
        LOGGER.debug("retying initializing of resource {}", resourceUrl);
        try {
            return initIdmEngineFromResource(new URL(resourceUrl));
        } catch (MalformedURLException e) {
            throw new FlowableException("invalid url: " + resourceUrl, e);
        }
    }

    /**
     * provides access to idm engine to application clients in a managed server environment.
     */
    public static Map<String, IdmEngine> getIdmEngines() {
        return idmEngines;
    }

    /**
     * closes all idm engines. This method should be called when the server shuts down.
     */
    public static synchronized void destroy() {
        if (isInitialized()) {
            Map<String, IdmEngine> engines = new HashMap<>(idmEngines);
            idmEngines = new HashMap<>();

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Print/inspect the resourceUrl string and fix its format (must include a valid protocol, e.g. file:/path/to/flowable.idm.cfg.xml).
  2. Validate the URL with new URL(resourceUrl) in a try/catch before calling retry, or sanitize/encode it.
  3. If the URL came from a saved EngineInfo, re-derive it from the actual resource location instead of trusting the stored string.
  4. URL-encode spaces and special characters in file paths.

Example fix

// before
EngineInfo info = IdmEngines.retry("/app/config/flowable.idm.cfg.xml"); // no protocol
// after
EngineInfo info = IdmEngines.retry("file:/app/config/flowable.idm.cfg.xml");
Defensive patterns

Strategy: validation

Validate before calling

boolean valid;
try { new URL(resourceUrl); valid = true; } catch (MalformedURLException e) { valid = false; }
if (!valid) throw new IllegalArgumentException("Not a valid URL: " + resourceUrl);

Try / catch

try {
    EngineInfo info = IdmEngines.retry(resourceUrl);
} catch (FlowableException e) {
    LOG.error("Malformed engine resource URL: {}", resourceUrl, e.getCause());
    throw new ConfigurationException("Invalid engine resource URL", e);
}

Prevention

When it happens

Trigger: Calling IdmEngines.retry(resourceUrl) with a URL string that is malformed — missing protocol, illegal characters, or a scheme the URL handler does not support.

Common situations: 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.

Understand the failure class

Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/7217cbd144cbae40. Report an issue: GitHub.