{"record":{"id":"e246b957a02bf49d","repo":"NationalSecurityAgency/ghidra","slug":"missing-configuration-data","errorCode":null,"errorMessage":"Missing configuration data: ","messagePattern":"Missing configuration data: ","errorType":"exception","errorClass":"LSHException","httpStatus":null,"severity":"error","filePath":"Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/FunctionDatabase.java","lineNumber":312,"sourceCode":"\t\telse if ((flags & ExecutableRecord.METADATA_DATE) != 0) {\n\t\t\tres = newrec.getNameExec() + \" already ingested with a different date: \" +\n\t\t\t\torig.getDate().toString();\n\t\t}\n\t\telse {\n\t\t\tres = newrec.getNameExec() + \" already ingested with UNKNOWN difference in metadata\";\n\t\t}\n\t\treturn res;\n\t}\n\n\tpublic static Configuration loadConfigurationTemplate(String configname) throws LSHException {\n\t\tResourceFile moduleDataSubDirectory;\n\t\tfinal Configuration config = new Configuration();\n\t\ttry {\n\t\t\tmoduleDataSubDirectory = Application.getModuleDataSubDirectory(\"\");\n\t\t\tconfig.loadTemplate(moduleDataSubDirectory, configname);\n\t\t}\n\t\tcatch (final FileNotFoundException e) {\n\t\t\tthrow new LSHException(\"Missing configuration data: \" + e.getMessage());\n\t\t}\n\t\tcatch (final IOException e) {\n\t\t\tthrow new LSHException(\"Could open module data directory\");\n\t\t}\n\t\tcatch (final SAXException e) {\n\t\t\tthrow new LSHException(\"Unable to parse configuration template\");\n\t\t}\n\t\treturn config;\n\t}\n\n\t/**\n\t * Central location for building vector factory used by FunctionDatabase\n\t * @return the LSHVectorFactory object\n\t */\n\tpublic static WeightedLSHCosineVectorFactory generateLSHVectorFactory() {\n\t\treturn new WeightedLSHCosineVectorFactory();\n\t}\n","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/FunctionDatabase.java#L294-L330","documentation":"Thrown by FunctionDatabase.loadConfigurationTemplate when the named BSim configuration template file cannot be found in the module data directory (FileNotFoundException). The configuration template defines the signature weights and category layout BSim uses; without it, a database cannot be created or opened with the right settings.","triggerScenarios":"Calling loadConfigurationTemplate(configname) where configname does not correspond to an existing template file under the application's module data subdirectory, or the module data directory itself is missing the template.","commonSituations":"Specifying a custom configuration name that does not exist (typo). The Ghidra installation is incomplete or the BSim module data files were not shipped/installed. Running against a stripped-down Ghidra distribution missing the data/templates directory. A migration moved the application directory without copying module data.","solutions":["Verify the configname matches an installed template file in the Ghidra module data directory (common names like 'medium' or 'large').","Reinstall or repair the Ghidra installation so the BSim module data subdirectory and its template files are present.","Check the Application.getModuleDataSubDirectory path resolves to the expected location and contains the template.","Use one of the built-in configuration names rather than a custom one unless you have placed the file correctly."],"exampleFix":"// before\nConfiguration c = FunctionDatabase.loadConfigurationTemplate(\"meduim\"); // typo\n// after\nConfiguration c = FunctionDatabase.loadConfigurationTemplate(\"medium\");","handlingStrategy":"try-catch","validationCode":"// Verify the template file exists before loading\nResourceFile dir = Application.getModuleDataSubDirectory(\"\");\nResourceFile template = new ResourceFile(dir, configname);\nif (!template.exists()) {\n    throw new IllegalArgumentException(\"BSim configuration template not found: \" + template);\n}\nConfiguration config = FunctionDatabase.loadConfigurationTemplate(configname);","typeGuard":null,"tryCatchPattern":"try {\n    Configuration config = FunctionDatabase.loadConfigurationTemplate(configname);\n} catch (LSHException e) {\n    if (e.getMessage().startsWith(\"Missing configuration data\")) {\n        log.error(\"BSim config template '{}' not found; check installation\", configname, e);\n    }\n    throw e;\n}","preventionTips":["Use a known built-in configuration name unless you have installed a custom template.","Verify the module data directory contains the template file before calling loadConfigurationTemplate.","Repair the Ghidra installation if module data files are missing."],"tags":["bsim","configuration","file-not-found","setup"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}