NationalSecurityAgency/ghidra · error · IllegalArgumentException

Missing name of new category

Error message

Missing name of new category

What it means

Thrown by doInstallCategory() when no positional category-name argument is supplied to addexecategory. The command inserts a new executable category into the BSim database and requires the category name as a mandatory positional token after the bsimURL.

Source

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

		try (BulkSignatures bsim = getBulkSignatures()) {
			bsim.printMetadata();
		}
	}

	/**
	 * Inserts a new category name into the BSim database. 
	 * 
	 * This variant of the install category 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 doInstallCategory(List<String> params) throws IOException, LSHException {
		if (params.size() < 1) {
			throw new IllegalArgumentException("Missing name of new category");
		}
		boolean dateOption = booleanOptions.contains(CATEGORY_DATE_OPTION);

		String categoryName = params.get(0);

		if (params.size() > 1) {
			throw new IllegalArgumentException("Unexpected parameter: " + params.get(1));
		}

		try (BulkSignatures bsim = getBulkSignatures()) {
			bsim.installCategory(categoryName, dateOption);
		}
	}

	/**
	 * Inserts a new function tag into the BSim database.
	 * 
	 * This variant of the tag install method is intended for command-line

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Append the category name: addexecategory <bsimURL> <category_name>.
  2. Optionally add --date to make it a date-valued category.
  3. Check usage at line 1028.

Example fix

// before
bsim addexecategory postgresql://myhost/BsimDB
// after
bsim addexecategory postgresql://myhost/BsimDB build_date --date
Defensive patterns

Strategy: validation

Validate before calling

// addexecategory requires a positional category name
if ("addexecategory".equals(command) && positionalParams.isEmpty()) {
    throw new IllegalArgumentException("addexecategory requires a category name argument");
}

Prevention

When it happens

Trigger: Running 'bsim addexecategory <bsimURL>' with no positional argument. params.size() < 1 at line 940.

Common situations: Forgetting the category name; quoting issue causing it to be consumed differently; a shell variable that expanded to empty.

Related errors


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