NationalSecurityAgency/ghidra · error · IllegalArgumentException
Missing required parameter: {}
Error message
Missing required parameter: {} What it means
Thrown by checkRequiredParam when the params array is shorter than the required positional index. Each subcommand mandates a minimum number of positional arguments (e.g. a host/repository path), and this fires before the option loop when a slot is absent.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/BSimControlLaunchable.java:357
forceShutdown = true;
break;
default:
throw new AssertionError("Missing option handling: " + option);
}
}
if (sawNoLocalAuth) { // Turn off authentication for local connections
authConfigPresent = true;
localAuthentication = AUTHENTICATION_NONE;
}
if (connectingUserName == null) {
connectingUserName = ClientUtil.getUserName();
}
}
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("--")) {
throw new IllegalArgumentException(
"Missing required parameter (" + name + ") before specified option: " + p);
}
}
private int parsePositiveIntegerOption(String option, String optionValue) {
try {
int value = Integer.valueOf(optionValue);
if (value < 0) {
throw new IllegalArgumentException("Negative value not permitted for " + option);
}
return value;
}
catch (NumberFormatException e) {
throw new IllegalArgumentException("Invalid integer value specified for " + option);View on GitHub (pinned to d5f144c24d)
Solutions
- Supply the missing positional argument the message names.
- Check the subcommand's usage via --help for the required positionals.
- Verify your script/alias passes the full argument list.
Example fix
// before bsim control configure --port 5432 // after bsim control configure myhost --port 5432
Defensive patterns
Strategy: validation
Validate before calling
// Ensure enough positional arguments exist before launching.
int required = requiredPositionalsFor(command);
if (positionalArgs.size() < required) {
System.err.println("Command " + command + " requires " + required + " positional argument(s).");
printUsage(command);
return;
} Try / catch
try {
launchable.checkRequiredParam(params, index, name);
} catch (IllegalArgumentException e) {
if (e.getMessage().startsWith("Missing required parameter:")) {
printUsage(command);
}
throw e;
} Prevention
- Track each subcommand's required positional count and validate before dispatch.
- Print usage whenever a required positional is missing.
- In scripts, assert the argument count before invoking.
When it happens
Trigger: Calling a subcommand with fewer positional arguments than required, so `params.length <= index` at line 357.
Common situations: Forgetting a required positional (e.g. omitting the host), assuming it is optional, or a script dropping an argument.
Related errors
- Unknown command: {}
- Unsupported command: {}
- Unsupported option use: {}
- Unexpected argument: {}
- Unsupported option specification: {}=
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/e222d9ad5f3c04d6.
Report an issue: GitHub.