{"record":{"id":"2589202e9c07573a","repo":"NationalSecurityAgency/ghidra","slug":"missing-one-or-more-metadata-options-name-ow","errorCode":null,"errorMessage":"Missing one or more metadata options: --name, --owner, --description","messagePattern":"Missing one or more metadata options: --name, --owner, --description","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java","lineNumber":904,"sourceCode":"\n\t/**\n\t * Updates the BSim database metadata with the given values.\n\t * \n\t * This variant of the update metadata method is intended for command-line\n\t * users. \n\t * \n\t * @param params the command-line params\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\tprivate void doInstallMetadata(List<String> params) throws IOException, LSHException {\n\n\t\tString nameOption = optionValueMap.get(NAME_OPTION);\n\t\tString ownerOption = optionValueMap.get(OWNER_OPTION);\n\t\tString descOption = optionValueMap.get(DESCRIPTION_OPTION);\n\n\t\tif (isAllNull(nameOption, ownerOption, descOption)) {\n\t\t\tthrow new IllegalArgumentException(\"Missing one or more metadata options: \" +\n\t\t\t\tNAME_OPTION + \", \" + OWNER_OPTION + \", \" + DESCRIPTION_OPTION);\n\t\t}\n\n\t\ttry (BulkSignatures bsim = getBulkSignatures()) {\n\t\t\tbsim.installMetadata(nameOption, ownerOption, descOption);\n\t\t}\n\t}\n\n\t/**\n\t * Prints the BSim database metadata.\n\t * \n\t * This variant of the print metadata method is intended for command-line\n\t * users.\n\t * \n\t * @param params the command-line params\n\t * @throws IOException if there's an error establishing the database connection\n\t */\n\tprivate void doPrintMetadata(List<String> params) throws IOException {","sourceCodeStart":886,"sourceCodeEnd":922,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java#L886-L922","documentation":"Thrown by doInstallMetadata() when none of --name, --owner, or --description is supplied to setmetadata. The command's purpose is to update database metadata fields, so at least one must be provided; otherwise there is nothing to set. Note the check uses isAllNull() — partially specifying metadata (e.g. only --name) is allowed and only the null fields are left unchanged.","triggerScenarios":"Running 'bsim setmetadata <bsimURL>' with no metadata options. All three of nameOption, ownerOption, descOption are null at line 903.","commonSituations":"Forgetting that setmetadata requires content; running it to 'view' metadata (use getmetadata instead); scripting and passing empty strings.","solutions":["Add at least one of --name, --owner, or --description with a value.","If you meant to read metadata, use 'getmetadata <bsimURL>' instead."],"exampleFix":"// before\nbsim setmetadata postgresql://myhost/BsimDB\n// after\nbsim setmetadata postgresql://myhost/BsimDB --name \"Production DB\" --owner \"analysis-team\"","handlingStrategy":"validation","validationCode":"// setmetadata requires at least one metadata field\nString name = optionValueMap.get(\"--name\");\nString owner = optionValueMap.get(\"--owner\");\nString desc = optionValueMap.get(\"--description\");\nif (name == null && owner == null && desc == null) {\n    throw new IllegalArgumentException(\"setmetadata requires at least one of --name, --owner, --description\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Distinguish setmetadata (write) from getmetadata (read) in scripts.","Validate at least one field is non-null before issuing the command."],"tags":["cli","argument-validation","bsim","setmetadata","missing-option"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}