NationalSecurityAgency/ghidra · error · LSHException

Missing configuration data:

Error message

Missing configuration data: 

What it means

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.

Source

Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/FunctionDatabase.java:312

		else if ((flags & ExecutableRecord.METADATA_DATE) != 0) {
			res = newrec.getNameExec() + " already ingested with a different date: " +
				orig.getDate().toString();
		}
		else {
			res = newrec.getNameExec() + " already ingested with UNKNOWN difference in metadata";
		}
		return res;
	}

	public static Configuration loadConfigurationTemplate(String configname) throws LSHException {
		ResourceFile moduleDataSubDirectory;
		final Configuration config = new Configuration();
		try {
			moduleDataSubDirectory = Application.getModuleDataSubDirectory("");
			config.loadTemplate(moduleDataSubDirectory, configname);
		}
		catch (final FileNotFoundException e) {
			throw new LSHException("Missing configuration data: " + e.getMessage());
		}
		catch (final IOException e) {
			throw new LSHException("Could open module data directory");
		}
		catch (final SAXException e) {
			throw new LSHException("Unable to parse configuration template");
		}
		return config;
	}

	/**
	 * Central location for building vector factory used by FunctionDatabase
	 * @return the LSHVectorFactory object
	 */
	public static WeightedLSHCosineVectorFactory generateLSHVectorFactory() {
		return new WeightedLSHCosineVectorFactory();
	}

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Verify the configname matches an installed template file in the Ghidra module data directory (common names like 'medium' or 'large').
  2. Reinstall or repair the Ghidra installation so the BSim module data subdirectory and its template files are present.
  3. Check the Application.getModuleDataSubDirectory path resolves to the expected location and contains the template.
  4. Use one of the built-in configuration names rather than a custom one unless you have placed the file correctly.

Example fix

// before
Configuration c = FunctionDatabase.loadConfigurationTemplate("meduim"); // typo
// after
Configuration c = FunctionDatabase.loadConfigurationTemplate("medium");
Defensive patterns

Strategy: try-catch

Validate before calling

// Verify the template file exists before loading
ResourceFile dir = Application.getModuleDataSubDirectory("");
ResourceFile template = new ResourceFile(dir, configname);
if (!template.exists()) {
    throw new IllegalArgumentException("BSim configuration template not found: " + template);
}
Configuration config = FunctionDatabase.loadConfigurationTemplate(configname);

Try / catch

try {
    Configuration config = FunctionDatabase.loadConfigurationTemplate(configname);
} catch (LSHException e) {
    if (e.getMessage().startsWith("Missing configuration data")) {
        log.error("BSim config template '{}' not found; check installation", configname, e);
    }
    throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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