flowable/flowable-engine · error · IOException
Error opening url:
Error message
Error opening url:
What it means
When deploying processes found in an OSGi bundle, Extender.checkBundle opens a stream for each discovered URL and throws IOException('Error opening url: ...') if openStream() returns null. This means the resource URL exists syntactically but its contents cannot be read, so it cannot be added to the deployment builder.
Solutions
- Verify the resource referenced by the URL actually exists inside the bundle (check Bundle-Wiring / Bundle content)
- Confirm the bundle exports/includes the BPMN/BAR resources at the declared paths
- Check any custom URL handlers (bar:, bpmn:) are functioning and returning valid connections
- Log the failing URL and test opening it manually in the same container
Example fix
// before
URL url = new URL("bpmn:file:/missing/process.bpmn20.xml");
// after
URL url = new URL("bpmn:file:/processes/process.bpmn20.xml"); // ensure file exists in bundle
try (InputStream is = url.openStream()) {
builder.addInputStream(getPath(url), is);
} Defensive patterns
Strategy: validation
Validate before calling
// before deploying from a bundle URL
URL url = ...;
URLConnection conn = url.openConnection();
long len = conn.getContentLengthLong();
if (len == 0) throw new IllegalStateException("Resource empty/unreadable: " + url); Try / catch
try {
deployFromBundle(bundle);
} catch (IOException e) {
if (e.getMessage().startsWith("Error opening url")) {
logger.error("Bundle resource unreadable: {} — check bundle contents and exports", e.getMessage(), e);
}
throw e;
} Prevention
- Verify resources are packaged in the bundle and match manifest-declared paths
- Open the URLs manually in a test to confirm readability before deployment
- Avoid custom URL handlers unless they reliably return non-null streams
When it happens
Trigger: url.openStream() returning null (or an URL handler returning a Connection whose stream is unavailable) for one of the BPMN/BAR resource URLs collected from a bundle during checkBundle.
Common situations: Resource pointed to by the URL was removed or not exported by the bundle; custom URL handlers failing silently; bundle resource paths declared in the manifest that don't match actual entries.
Understand the failure class
Background: "open() failed", "failed to open file", "cannot create file" — what a file open error means and how to fix it — this error's family across 42 libraries.
Related errors
- Bundle cannot be generated
- byte array for resource
- byte array for resource
- could not get byte array from resource
- could not get byte array from resource
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/80690b65983f6687.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-osgi/src/main/java/org/flowable/osgi/Extender.java:221
}
}
}
if (!pathList.isEmpty()) {
LOGGER.debug("Found flowable process in bundle {} with paths: {}", bundle.getSymbolicName(), pathList);
ProcessEngine engine = (ProcessEngine) engineServiceTracker.waitForService(timeout);
if (engine == null) {
throw new IllegalStateException("Unable to find a ProcessEngine service");
}
RepositoryService service = engine.getRepositoryService();
DeploymentBuilder builder = service.createDeployment();
builder.name(bundle.getSymbolicName());
for (URL url : pathList) {
InputStream is = url.openStream();
if (is == null) {
throw new IOException("Error opening url: " + url);
}
try {
builder.addInputStream(getPath(url), is);
} finally {
is.close();
}
}
builder.enableDuplicateFiltering();
builder.deploy();
} else {
LOGGER.debug("No flowable process found in bundle {}", bundle.getSymbolicName());
}
} catch (Throwable t) {
LOGGER.error("Unable to deploy flowable bundle", t);
}
}
private void addEntry(Bundle bundle, String path, List<URL> pathList) {View on GitHub (pinned to d6d39ce1c6)