flowable/flowable-engine · error · FlowableException

invalid url:

Error message

invalid url: 

What it means

FlowableException('invalid url: ...') is thrown by EventRegistryEngines.retry(String) when the supplied resourceUrl string cannot be parsed into a java.net.URL (MalformedURLException). retry() re-attempts engine initialization for a previously failed resource URL, but only well-formed URLs are accepted.

Source

Thrown at modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventRegistryEngines.java:205

     * @param eventRegistryEngineName
     *            is the name of the event registry engine or null for the default event registry engine.
     */
    public static EventRegistryEngine getEventRegistryEngine(String eventRegistryEngineName) {
        if (!isInitialized()) {
            init();
        }
        return eventRegistryEngines.get(eventRegistryEngineName);
    }

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

    /**
     * provides access to event registry engine to application clients in a managed server environment.
     */
    public static Map<String, EventRegistryEngine> getEventRegistryEngines() {
        return eventRegistryEngines;
    }

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

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Pass the exact resourceUrl from EngineInfo.getResourceUrl(), not a hand-typed or classpath-style path
  2. Convert classpath locations to URLs first (e.g. getClass().getResource(path))
  3. URL-encode spaces and special characters in file paths before calling retry

Example fix

// before
EventRegistryEngines.retry("flowable-eventregistry.cfg.xml"); // malformed
// after
EngineInfo info = EventRegistryEngines.getEventRegistryEngineInfos().get(0);
EventRegistryEngines.retry(info.getResourceUrl());
Defensive patterns

Strategy: validation

Validate before calling

boolean isValidUrl(String s) {
    try { new java.net.URL(s); return true; } catch (java.net.MalformedURLException e) { return false; }
}

Try / catch

try {
    return EventRegistryEngines.retry(resourceUrl);
} catch (FlowableException e) {
    LOGGER.error("retry failed for {}", resourceUrl, e);
    return null;
}

Prevention

When it happens

Trigger: Calling EventRegistryEngines.retry(resourceUrl) with a string that is not a valid absolute URL — e.g. a bare classpath path like 'flowable.cfg.xml' or a malformed 'classpath:...' URI instead of a URL like 'file:/...' or a real http/file URL.

Common situations: Passing a Spring resource path ('classpath:...') rather than the URL stored earlier in EngineInfo.getResourceUrl(); URL with illegal characters (unencoded spaces); truncating the URL when copying it.

Understand the failure class

Background: "Invalid URL" / "URL cannot be empty": fix the malformed or missing URL behind request-construction failures — this error's family across 50 libraries.

Related errors


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