{"record":{"id":"88a1414cb8485975","repo":"flowable/flowable-engine","slug":"couldn-t-open-url-url","errorCode":null,"errorMessage":"couldn't open url '${url}'","messagePattern":"couldn't open url '(.+?)'","errorType":"exception","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/util/io/UrlStreamSource.java","lineNumber":38,"sourceCode":"import org.flowable.common.engine.api.FlowableIllegalArgumentException;\n\n/**\n * @author Tom Baeyens\n */\npublic class UrlStreamSource implements StreamSource {\n\n    URL url;\n\n    public UrlStreamSource(URL url) {\n        this.url = url;\n    }\n\n    @Override\n    public InputStream getInputStream() {\n        try {\n            return new BufferedInputStream(url.openStream());\n        } catch (IOException e) {\n            throw new FlowableIllegalArgumentException(\"couldn't open url '\" + url + \"'\", e);\n        }\n    }\n}\n","sourceCodeStart":20,"sourceCodeEnd":42,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/util/io/UrlStreamSource.java#L20-L42","documentation":"Thrown by UrlStreamSource.getInputStream() when URL.openStream() raises an IOException — the URL resource could not be opened (connection failure, unknown host, file not found, protocol issues). FlowableIllegalArgumentException wraps the original IOException.","triggerScenarios":"getInputStream() is called on a UrlStreamSource whose URL is unreachable: connection refused, DNS failure, 404/500 on HTTP resource, or an unsupported protocol handler.","commonSituations":"Process deployments referencing remote BPMN resources whose server is down; file:// URLs pointing to missing files; typos in configured resource URLs; proxies/firewalls blocking the connection.","solutions":["Open the URL in a browser/curl to confirm it is reachable","Fix typos or scheme errors in the configured URL","Check network connectivity, proxy, and firewall settings","If it's a file URL, verify the file exists and is readable"],"exampleFix":"// before\nnew UrlStreamSource(new URL(\"http://repo.example.com/missing.bpmn20.xml\"))\n// after\nnew UrlStreamSource(new URL(\"http://repo.example.com/processes/order.bpmn20.xml\"))","handlingStrategy":"try-catch","validationCode":"try (InputStream probe = url.openStream()) {\n    if (probe.read() == -1) throw new IllegalStateException(\"URL resource is empty: \" + url);\n} catch (IOException e) {\n    throw new IllegalStateException(\"URL not reachable before use: \" + url, e);\n}","typeGuard":"boolean isReachable(URL url) {\n    try (InputStream in = url.openStream()) { return in.read() != -1; }\n    catch (IOException e) { return false; }\n}","tryCatchPattern":"try {\n    InputStream is = urlSource.getInputStream();\n} catch (FlowableIllegalArgumentException e) {\n    logger.error(\"Cannot open resource URL: \" + e.getMessage(), e.getCause());\n}","preventionTips":["Validate URLs with a connectivity probe before configuring them","Check scheme support (http/https/file) and DNS resolution","Account for proxies/firewalls in deployment environments"],"tags":["io","url","network"],"backgroundTag":"invalid-url","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}