{"record":{"id":"80690b65983f6687","repo":"flowable/flowable-engine","slug":"error-opening-url","errorCode":null,"errorMessage":"Error opening url: ","messagePattern":"Error opening url: ","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"modules/flowable-osgi/src/main/java/org/flowable/osgi/Extender.java","lineNumber":221,"sourceCode":"                    }\n                }\n            }\n\n            if (!pathList.isEmpty()) {\n                LOGGER.debug(\"Found flowable process in bundle {} with paths: {}\", bundle.getSymbolicName(), pathList);\n\n                ProcessEngine engine = (ProcessEngine) engineServiceTracker.waitForService(timeout);\n                if (engine == null) {\n                    throw new IllegalStateException(\"Unable to find a ProcessEngine service\");\n                }\n\n                RepositoryService service = engine.getRepositoryService();\n                DeploymentBuilder builder = service.createDeployment();\n                builder.name(bundle.getSymbolicName());\n                for (URL url : pathList) {\n                    InputStream is = url.openStream();\n                    if (is == null) {\n                        throw new IOException(\"Error opening url: \" + url);\n                    }\n                    try {\n                        builder.addInputStream(getPath(url), is);\n                    } finally {\n                        is.close();\n                    }\n                }\n                builder.enableDuplicateFiltering();\n                builder.deploy();\n            } else {\n                LOGGER.debug(\"No flowable process found in bundle {}\", bundle.getSymbolicName());\n            }\n        } catch (Throwable t) {\n            LOGGER.error(\"Unable to deploy flowable bundle\", t);\n        }\n    }\n\n    private void addEntry(Bundle bundle, String path, List<URL> pathList) {","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-osgi/src/main/java/org/flowable/osgi/Extender.java#L203-L239","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nURL url = new URL(\"bpmn:file:/missing/process.bpmn20.xml\");\n// after\nURL url = new URL(\"bpmn:file:/processes/process.bpmn20.xml\"); // ensure file exists in bundle\ntry (InputStream is = url.openStream()) {\n    builder.addInputStream(getPath(url), is);\n}","handlingStrategy":"validation","validationCode":"// before deploying from a bundle URL\nURL url = ...;\nURLConnection conn = url.openConnection();\nlong len = conn.getContentLengthLong();\nif (len == 0) throw new IllegalStateException(\"Resource empty/unreadable: \" + url);","typeGuard":null,"tryCatchPattern":"try {\n    deployFromBundle(bundle);\n} catch (IOException e) {\n    if (e.getMessage().startsWith(\"Error opening url\")) {\n        logger.error(\"Bundle resource unreadable: {} — check bundle contents and exports\", e.getMessage(), e);\n    }\n    throw e;\n}","preventionTips":["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"],"tags":["osgi","io","deployment"],"backgroundTag":"file-open-failed","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"}