{"record":{"id":"a22c80a8b6c98da8","repo":"NationalSecurityAgency/ghidra","slug":"could-not-change-metadata","errorCode":null,"errorMessage":"Could not change metadata: {}","messagePattern":"Could not change metadata: (.+?)","errorType":"exception","errorClass":"LSHException","httpStatus":null,"severity":"error","filePath":"Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BulkSignatures.java","lineNumber":774,"sourceCode":"\t * @param name the database name\n\t * @param owner the database owner\n\t * @param description the database description\n\t * @throws IOException if there's an error establishing the database connection\n\t * @throws LSHException if there's an error issuing the query\n\t */\n\tprotected void installMetadata(String name, String owner, String description)\n\t\t\tthrows IOException, LSHException {\n\n\t\tDatabaseInformation info = establishQueryServerConnection(false);\n\n\t\tInstallMetadataRequest req = new InstallMetadataRequest();\n\t\treq.dbname = name;\n\t\treq.owner = owner;\n\t\treq.description = description;\n\t\tResponseInfo resp = req.execute(querydb);\n\t\tif (resp == null) {\n\t\t\tBSimError lastError = querydb.getLastError();\n\t\t\tthrow new LSHException(\"Could not change metadata: \" + lastError.message);\n\t\t}\n\t\tinfo = resp.info;\n\t\tMsg.info(this, \"Updated BSim metadata: \");\n\t\tMsg.info(this, \"   Database:     \" + info.databasename);\n\t\tMsg.info(this, \"   Owner:        \" + info.owner);\n\t\tMsg.info(this, \"   Description:  \" + info.description);\n\t}\n\n\t/**\n\t * Prints the metadata.\n\t * \n\t * @throws IOException if there's an error establishing the database connection\n\t */\n\tpublic void printMetadata() throws IOException {\n\t\tDatabaseInformation info = establishQueryServerConnection(false);\n\t\tMsg.info(this, \"BSim metadata: \");\n\t\tMsg.info(this, \"   Database:     \" + info.databasename);\n\t\tMsg.info(this, \"   Owner:        \" + info.owner);","sourceCodeStart":756,"sourceCodeEnd":792,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BulkSignatures.java#L756-L792","documentation":"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).","triggerScenarios":"Changing database name/owner/description on a server that rejects it: invalid characters, conflicting name, insufficient privileges, or a backend error.","commonSituations":"Renaming to a name that already exists; owner value rejected; privileges; transient failure.","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."],"exampleFix":"// before\nbsim.installMetadata(\"existing-name\", owner, desc);  // conflict -> LSHException\n\n// after\n// use a unique name or keep the existing one\nbsim.installMetadata(\"new-unique-name\", owner, desc);","handlingStrategy":"try-catch","validationCode":"// choose a unique database name and acceptable owner before installing metadata","typeGuard":null,"tryCatchPattern":"try {\n    bsim.installMetadata(name, owner, desc);\n} catch (LSHException e) {\n    // message: \"Could not change metadata: <server>\"; adjust name/owner per the message\n}","preventionTips":["Use a unique database name to avoid conflicts.","Ensure the user has admin/metadata privileges.","Retry on transient failures."],"tags":["bsim","metadata","lshexception"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}