NationalSecurityAgency/ghidra · error · IllegalArgumentException
Missing required parameter: {}
Error message
Missing required parameter: {} What it means
Thrown by checkRequiredParam() when the params array is too short to contain a required positional argument. All BSim commands require at least two positional arguments: the command name (params[0]) and a URL (params[1]). Some commands require additional positional parameters.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java:358
booleanOptions.add(option);
}
else if (!StringUtils.isBlank(value)) {
optionValueMap.put(option, value);
}
else {
// consume next param as option value
if (++i == params.length) {
throw new IllegalArgumentException("Missing option value: " + optionName);
}
optionValueMap.put(option, params[i]);
}
}
return subParams;
}
private void checkRequiredParam(String[] params, int index, String name) {
if (params.length <= index) {
throw new IllegalArgumentException("Missing required parameter: " + name);
}
String p = params[index];
if (p.startsWith("--") || p.contains("=")) {
throw new IllegalArgumentException(
"Missing required parameter (" + name + ") before specified option: " + p);
}
}
private Integer parsePositiveIntegerOption(String option) {
String optionValue = optionValueMap.get(option);
if (optionValue == null) {
return null;
}
try {
int value = Integer.valueOf(optionValue);
if (value < 0) {
throw new IllegalArgumentException("Negative value not permitted for " + option);
}View on GitHub (pinned to d5f144c24d)
Solutions
- Provide both the command name and URL: 'bsim <command> <url> [options]'.
- Check the command's documentation for required positional parameters beyond URL.
- Verify that wrapper scripts or build tools pass all arguments through correctly.
Example fix
// before bsim createdatabase // error: Missing required parameter: URL // after bsim createdatabase h2://localhost/mybsimdb
Defensive patterns
Strategy: validation
Validate before calling
if (args.length < 2) {
System.err.println("Usage: bsim <command> <url> [options]");
System.err.println("Commands: createdatabase, dropdatabase, setmetadata, ...");
throw new IllegalArgumentException("Missing required arguments");
} Prevention
- Always provide at least a command name and URL as the first two arguments.
- Build a usage/help wrapper that checks arg count before delegating to BSimLaunchable.run().
- Validate argument count in wrapper scripts before calling the BSim tool.
When it happens
Trigger: Running 'bsim createdatabase' with no URL argument (params has only 1 element, but index 1 is required). Or running 'bsim' alone with no arguments (params[0] itself is missing).
Common situations: Forgetting the URL argument; running with no arguments to see usage (BSim does not print help in this case, it throws); a wrapper script that drops arguments.
Related errors
- Unsupported option use: {}
- Unexpected argument: {}
- Unsupported option specification: {}=
- Missing option value: {}
- Missing required parameter ({}) before specified option: {}
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/e08e2813038a17ef.
Report an issue: GitHub.