NationalSecurityAgency/ghidra · error · IllegalArgumentException

Missing one or more metadata options: --name, --owner, --des

Error message

Missing one or more metadata options: --name, --owner, --description

What it means

Thrown by doInstallMetadata() when none of --name, --owner, or --description is supplied to setmetadata. The command's purpose is to update database metadata fields, so at least one must be provided; otherwise there is nothing to set. Note the check uses isAllNull() — partially specifying metadata (e.g. only --name) is allowed and only the null fields are left unchanged.

Source

Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java:904

	/**
	 * Updates the BSim database metadata with the given values.
	 * 
	 * This variant of the update metadata method is intended for command-line
	 * users. 
	 * 
	 * @param params the command-line params
	 * @throws IOException if there's an error establishing the database connection
	 * @throws LSHException if there's an error issuing the query
	 */
	private void doInstallMetadata(List<String> params) throws IOException, LSHException {

		String nameOption = optionValueMap.get(NAME_OPTION);
		String ownerOption = optionValueMap.get(OWNER_OPTION);
		String descOption = optionValueMap.get(DESCRIPTION_OPTION);

		if (isAllNull(nameOption, ownerOption, descOption)) {
			throw new IllegalArgumentException("Missing one or more metadata options: " +
				NAME_OPTION + ", " + OWNER_OPTION + ", " + DESCRIPTION_OPTION);
		}

		try (BulkSignatures bsim = getBulkSignatures()) {
			bsim.installMetadata(nameOption, ownerOption, descOption);
		}
	}

	/**
	 * Prints the BSim database metadata.
	 * 
	 * This variant of the print metadata method is intended for command-line
	 * users.
	 * 
	 * @param params the command-line params
	 * @throws IOException if there's an error establishing the database connection
	 */
	private void doPrintMetadata(List<String> params) throws IOException {

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Add at least one of --name, --owner, or --description with a value.
  2. If you meant to read metadata, use 'getmetadata <bsimURL>' instead.

Example fix

// before
bsim setmetadata postgresql://myhost/BsimDB
// after
bsim setmetadata postgresql://myhost/BsimDB --name "Production DB" --owner "analysis-team"
Defensive patterns

Strategy: validation

Validate before calling

// setmetadata requires at least one metadata field
String name = optionValueMap.get("--name");
String owner = optionValueMap.get("--owner");
String desc = optionValueMap.get("--description");
if (name == null && owner == null && desc == null) {
    throw new IllegalArgumentException("setmetadata requires at least one of --name, --owner, --description");
}

Prevention

When it happens

Trigger: Running 'bsim setmetadata <bsimURL>' with no metadata options. All three of nameOption, ownerOption, descOption are null at line 903.

Common situations: Forgetting that setmetadata requires content; running it to 'view' metadata (use getmetadata instead); scripting and passing empty strings.

Related errors


AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14). Data as JSON: /api/errors/2589202e9c07573a. Report an issue: GitHub.