NationalSecurityAgency/ghidra · error · IllegalArgumentException
Remote file URL not supported: {}
Error message
Remote file URL not supported: {} What it means
Thrown by the BSimServerInfo(URL) constructor when the protocol is file but the URL has a non-empty host component. BSim file databases are strictly local H2 files; a remote host in a file:// URL (e.g. file://server/share/db.mv.db) is unsupported. Throws IllegalArgumentException.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/BSimServerInfo.java:188
host = checkURLField(url.getHost(), "host");
userinfo = getURLUserInfo(url);
int p = url.getPort();
port = p <= 0 ? DEFAULT_POSTGRES_PORT : p;
}
else if (protocol.equals("https") || protocol.equals("elastic")) {
t = DBType.elastic;
host = checkURLField(url.getHost(), "host");
userinfo = getURLUserInfo(url);
int p = url.getPort();
port = p <= 0 ? DEFAULT_ELASTIC_PORT : p;
}
else if (protocol.startsWith("file")) {
t = DBType.file;
host = null;
userinfo = null;
port = -1;
if (!"".equals(url.getHost())) {
throw new IllegalArgumentException("Remote file URL not supported: " + url);
}
}
else {
throw new IllegalArgumentException("Unsupported BSim URL protocol: " + protocol);
}
dbType = t;
if (dbType == DBType.postgres || dbType == DBType.elastic) {
if (!path.startsWith("/")) {
throw new IllegalArgumentException("Missing dbName in URL: " + url);
}
path = path.substring(1).strip();
}
path = urlDecode(checkURLField(path, "path"));
if (dbType == DBType.file) {
path = cleanupFilename(path);
}
else if (path.contains("/")) {View on GitHub (pinned to d5f144c24d)
Solutions
- Use a local file:// URL with an empty host, e.g. 'file:/opt/bsim/data.mv.db'.
- If the database is remote, switch to a postgres or elastic protocol instead.
- Mount the network share locally and reference the mount point as a local path.
Example fix
// before
new BSimServerInfo(new URL("file://nas/share/bsim.mv.db"));
// after (local path, empty host)
new BSimServerInfo(new URL("file:/mnt/nas/share/bsim.mv.db")); Defensive patterns
Strategy: validation
Validate before calling
URL u = ...;
if (u.getProtocol().startsWith("file") && !"".equals(u.getHost())) {
throw new IllegalArgumentException("BSim file DBs must be local; URL has host: " + u.getHost());
} Prevention
- Use local file: URLs with an empty host for file databases.
- For remote databases, choose postgresql:// or https:// instead.
- Mount network shares locally and reference the mount point as a local path.
When it happens
Trigger: Constructing BSimServerInfo from a URL like 'file://nas/share/bsim.mv.db' where url.getHost() is non-empty.
Common situations: Pointing a file:// URL at a network share or remote machine; misinterpreting a UNC path as a supported file DB location.
Related errors
- Bad character in H2 database path. Disallowed characters:
- Invalid absolute file path:
- host required
- Non-empty dbName required
- Invalid {} dbName: {}
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/fd69f883b22188a4.
Report an issue: GitHub.