NationalSecurityAgency/ghidra · error · LSHException
Could not change metadata: {}
Error message
Could not change metadata: {} What it means
Thrown in installMetadata when ResponseInfo resp is null after InstallMetadataRequest.execute(querydb). The server rejected the metadata change and BulkSignatures wraps its BSimError as 'Could not change metadata: <message>' (LSHException).
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BulkSignatures.java:774
* @param name the database name
* @param owner the database owner
* @param description the database description
* @throws IOException if there's an error establishing the database connection
* @throws LSHException if there's an error issuing the query
*/
protected void installMetadata(String name, String owner, String description)
throws IOException, LSHException {
DatabaseInformation info = establishQueryServerConnection(false);
InstallMetadataRequest req = new InstallMetadataRequest();
req.dbname = name;
req.owner = owner;
req.description = description;
ResponseInfo resp = req.execute(querydb);
if (resp == null) {
BSimError lastError = querydb.getLastError();
throw new LSHException("Could not change metadata: " + lastError.message);
}
info = resp.info;
Msg.info(this, "Updated BSim metadata: ");
Msg.info(this, " Database: " + info.databasename);
Msg.info(this, " Owner: " + info.owner);
Msg.info(this, " Description: " + info.description);
}
/**
* Prints the metadata.
*
* @throws IOException if there's an error establishing the database connection
*/
public void printMetadata() throws IOException {
DatabaseInformation info = establishQueryServerConnection(false);
Msg.info(this, "BSim metadata: ");
Msg.info(this, " Database: " + info.databasename);
Msg.info(this, " Owner: " + info.owner);View on GitHub (pinned to d5f144c24d)
Solutions
- Read the message for the exact server reason.
- Use a unique database name and acceptable owner string.
- Ensure the user has admin/metadata privileges.
- Retry on transient failures.
Example fix
// before
bsim.installMetadata("existing-name", owner, desc); // conflict -> LSHException
// after
// use a unique name or keep the existing one
bsim.installMetadata("new-unique-name", owner, desc); Defensive patterns
Strategy: try-catch
Validate before calling
// choose a unique database name and acceptable owner before installing metadata
Try / catch
try {
bsim.installMetadata(name, owner, desc);
} catch (LSHException e) {
// message: "Could not change metadata: <server>"; adjust name/owner per the message
} Prevention
- Use a unique database name to avoid conflicts.
- Ensure the user has admin/metadata privileges.
- Retry on transient failures.
When it happens
Trigger: Changing database name/owner/description on a server that rejects it: invalid characters, conflicting name, insufficient privileges, or a backend error.
Common situations: Renaming to a name that already exists; owner value rejected; privileges; transient failure.
Related errors
- Duplicate md5 hash, different metadata
- Overwriting existing executable id
- LSHException fatal error
- Could not perform delete: {}
- Could not drop index: {}
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/a22c80a8b6c98da8.
Report an issue: GitHub.