NationalSecurityAgency/ghidra · error · UnsupportedOperationException

BSim server has not been specified

Error message

BSim server has not been specified

What it means

Thrown by BulkSignatures.checkBSimServerOperation whenever a server-dependent operation is attempted but the BulkSignatures instance was constructed with a null BSimServerInfo. The constructor explicitly permits a null server info for the limited use case of generating signatures/updates offline against a configuration template; any operation that needs to talk to a live server calls checkBSimServerOperation first and this guard fails fast with UnsupportedOperationException.

Source

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

					bsimServerInfo.getDBName());
			}
		}
		this.bsimServerInfo = bsimServerInfo;
	}

	/**
	 * Constructor
	 * @param bsimServerInfo the BSim database server info.  May be {@code null} if use limited to
	 * signature and update generation only (based upon configuration template).  If specified, 
	 * this object will convey the connecting user name.
	 */
	public BulkSignatures(BSimServerInfo bsimServerInfo) {
		this.bsimServerInfo = bsimServerInfo;
	}

	private void checkBSimServerOperation() {
		if (bsimServerInfo == null) {
			throw new UnsupportedOperationException("BSim server has not been specified");
		}
	}

	/**
	 *
	 * 
	 * @param async true if database commits should be synchronous
	 * @return  the {@link DatabaseInformation} object returned from a successful connect
	 * @throws IOException if there's a problem creating the connection
	 */
	private DatabaseInformation establishQueryServerConnection(boolean async) throws IOException {

		if (querydb != null) {
			return querydb.getInfo();
		}

		checkBSimServerOperation();

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Pass a non-null BSimServerInfo (built from the configured BSim URL) into new BulkSignatures(...) before issuing server commands.
  2. Split the workflow: use the null-server handle only for local signature/update generation, then build a new BulkSignatures with a server for ingest.
  3. Verify the BSim server URL is set in your launch properties/configuration before constructing BulkSignatures.

Example fix

// before
BulkSignatures bsim = new BulkSignatures(null);
bsim.prewarm();

// after
BSimServerInfo info = new BSimServerInfo(...);
BulkSignatures bsim = new BulkSignatures(info);
bsim.prewarm();
Defensive patterns

Strategy: validation

Validate before calling

// before any server command
if (bsimServerInfo == null) {
    throw new IllegalStateException(
        "BulkSignatures built without a server; cannot perform server operations");
}

Type guard

private static boolean canReachServer(BulkSignatures b) {
    try {
        b.getClass().getDeclaredMethod("checkBSimServerOperation");
        // best-effort: construct only with non-null BSimServerInfo for server work
        return true;
    } catch (NoSuchMethodException e) {
        return true;
    }
}

Try / catch

try {
    bsim.prewarm();
} catch (UnsupportedOperationException e) {
    if (e.getMessage().contains("BSim server has not been specified")) {
        // rebuild with a real BSimServerInfo and retry
    } else { throw e; }
}

Prevention

When it happens

Trigger: Constructing new BulkSignatures(null) (template-only mode) and then calling a method that routes through establishQueryServerConnection or otherwise needs the server: doDumpSigs against a remote, sendSignaturesToServer, sendUpdateToServer, createDatabase, dropDatabase, deleteExecutable, dropIndex, rebuildIndex, prewarm, getexeinfo, installMetadata, installCategory, etc.

Common situations: Reusing a signature-generation BulkSignatures handle for a server command; misconfiguration where the BSim server URL/BSimServerInfo was never resolved from properties; headless tool invoked with 'generatesigs' but then a server command appended.

Related errors


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