NationalSecurityAgency/ghidra · error · LSHException

Could not install new category: {}

Error message

Could not install new category: {}

What it means

Thrown in installCategory when ResponseInfo resp is null after InstallCategoryRequest.execute(querydb). The server rejected adding the new category column and BulkSignatures wraps its BSimError as 'Could not install new category: <message>' (LSHException).

Source

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

	 * object, establish the database connection, and perform the query.
	 * 
	 * @param categoryName the category name to insert
	 * @param isDate true if this is a date category
	 * @throws IOException if there's an error establishing the database connection
	 * @throws LSHException if there's an error issuing the query
	 */
	public void installCategory(String categoryName, boolean isDate)
			throws LSHException, IOException {
		DatabaseInformation info = establishQueryServerConnection(false);

		InstallCategoryRequest req = new InstallCategoryRequest();
		req.type_name = dequoteString(categoryName);
		req.isdatecolumn = isDate;

		ResponseInfo resp = req.execute(querydb);
		if (resp == null) {
			BSimError lastError = querydb.getLastError();
			throw new LSHException("Could not install new category: " + lastError.message);
		}
		info = resp.info;

		StringBuilder buf = new StringBuilder();
		buf.append("BSim Database ");
		buf.append(info.databasename);
		buf.append(" now contains:\n");
		formatCategories(info.execats, buf);
		if (info.dateColumnName != null) {
			buf.append(" Date column: ");
			buf.append(info.dateColumnName);
			buf.append("\n");
		}

		// TODO: Should this output differ for command-line vs workbench? debug only?
		Msg.info(this, buf.toString());
	}

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Read the message to confirm duplicate-name vs. other causes.
  2. Choose a unique category name and verify after dequoting.
  3. Ensure admin privileges for schema changes.
  4. Retry on transient failures.

Example fix

// before
bsim.installCategory("existing", false);  // duplicate -> LSHException

// after
// pick a new category name, or check current categories first
Defensive patterns

Strategy: try-catch

Validate before calling

// check current categories to avoid duplicate-name install
// pick a unique category name before calling installCategory

Try / catch

try {
    bsim.installCategory(categoryName, isDate);
} catch (LSHException e) {
    // message: "Could not install new category: <server>"; if duplicate, pick a new name
}

Prevention

When it happens

Trigger: Installing a category whose name already exists, an invalid/duplicate name after dequoting, a backend that rejects the column add, or a permissions/transport failure.

Common situations: Re-running installCategory with a name already present; name with reserved characters; insufficient privileges; transient error.

Related errors


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