flowable/flowable-engine · error · FlowableException
invalid url: " + resourceUrl
Error message
invalid url: " + resourceUrl
What it means
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.
Source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/DmnEngines.java:206
* @param dmnEngineName
* is the name of the dmn engine or null for the default dmn engine.
*/
public static DmnEngine getDmnEngine(String dmnEngineName) {
if (!isInitialized()) {
init();
}
return dmnEngines.get(dmnEngineName);
}
/**
* retries to initialize a dmn engine that previously failed.
*/
public static EngineInfo retry(String resourceUrl) {
LOGGER.debug("retying initializing of resource {}", resourceUrl);
try {
return initDmnEngineFromResource(new URL(resourceUrl));
} catch (MalformedURLException e) {
throw new FlowableException("invalid url: " + resourceUrl, e);
}
}
/**
* provides access to dmn engine to application clients in a managed server environment.
*/
public static Map<String, DmnEngine> getDmnEngines() {
return dmnEngines;
}
/**
* closes all dmn engines. This method should be called when the server shuts down.
*/
public static synchronized void destroy() {
if (isInitialized()) {
Map<String, DmnEngine> engines = new HashMap<>(dmnEngines);
dmnEngines = new HashMap<>();
View on GitHub (pinned to d6d39ce1c6)
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.
Example fix
// before
EngineInfo info = DmnEngines.retry("flowable.dmn.cfg.xml"); // not a URL
// after
URL url = DmnEngines.class.getClassLoader().getResource("flowable.dmn.cfg.xml");
EngineInfo info = DmnEngines.retry(url.toString()); Defensive patterns
Strategy: validation
Validate before calling
try { new java.net.URL(resourceUrl); } catch (java.net.MalformedURLException e) {
throw new IllegalArgumentException("Not a valid URL: " + resourceUrl, e);
} Type guard
null
Try / catch
try {
return DmnEngines.retry(resourceUrl);
} catch (FlowableException e) {
LOGGER.error("Invalid resource URL for DMN retry: {}", resourceUrl, e);
throw new IllegalArgumentException("resourceUrl must be an absolute URL", e);
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
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
- invalid url: {resourceUrl}
- couldn't open resource stream: {errorMessage}
- couldn't open resource stream: " + e.getMessage()
- Form engine is not initialized
- invalid url:
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/d22bef430bd63fc0.
Report an issue: GitHub.