languagetool-org/languagetool · error · IllegalConfigurationException
Property '' must be set in
Error message
Property '' must be set in
What it means
getProperty is the config-loading helper for mandatory server properties. If a required property is absent (null) or present but empty/whitespace-only, it throws IllegalConfigurationException naming the property and the config file it was expected in.
Source
Thrown at languagetool-server/src/main/java/org/languagetool/server/HTTPServerConfig.java:1395
/** @since 5.2 */
public void setNgramLangIdentData(File ngramLangIdentData) {
this.ngramLangIdentData = ngramLangIdentData;
}
/** @since 5.2 */
@Nullable
public File getNgramLangIdentData() {
return ngramLangIdentData;
}
/**
* @throws IllegalConfigurationException if property is not set
*/
protected String getProperty(Properties props, String propertyName, File config) {
String propertyValue = (String)props.get(propertyName);
if (propertyValue == null || propertyValue.trim().isEmpty()) {
throw new IllegalConfigurationException("Property '" + propertyName + "' must be set in " + config);
}
return propertyValue;
}
protected String getOptionalProperty(Properties props, String propertyName, String defaultValue) {
String propertyValue = (String)props.get(propertyName);
if (propertyValue == null) {
return defaultValue;
}
return propertyValue;
}
/** @since 5.1 */
boolean isPremiumAlways() {
return premiumAlways;
}
/** @since 5.1 */View on GitHub (pinned to 2e990059ce)
Solutions
- Add the named property with a non-empty value to the config file mentioned in the message
- If the value should be blank-checked, ensure it is trimmed non-empty — whitespace-only counts as missing
- Upgrade documentation: check which properties your LanguageTool version requires
Example fix
// before (properties) # dbPassword missing // after (properties) dbPassword=s3cret
Defensive patterns
Strategy: validation
Validate before calling
for (String required : List.of("dbUsername", "dbPassword")) {
String v = props.getProperty(required);
if (v == null || v.trim().isEmpty())
throw new IllegalStateException(required + " must be set in " + configFile);
} Try / catch
try {
String val = config.getProperty(props, "password", configFile);
} catch (IllegalConfigurationException e) {
LOG.error("Missing config property: {}", e.getMessage());
System.exit(1);
} Prevention
- Keep a canonical config template listing all required properties and diff against it on deploy
- Fail fast in CI by attempting a config load before deployment
- Never leave keys defined with empty values — remove them or fill them in
When it happens
Trigger: Server startup with a --config properties file that omits a required property (e.g. for the database-based pipeline: password, username, etc.), or defines it as an empty string (`prop=`).
Common situations: Missing keys in the properties file after upgrades that introduced new required options, copy-pasted config templates with placeholder values deleted, or whitespace-only values.
Understand the failure class
Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.
Related errors
- must be set
- code is supposed to be a 2 (or rarely 3) character code (unl
- dictionary file does not exist or is not a file: ''
- Common words path not found: ''
- No rules are active. Please make sure your rule ids (<option
AI-assisted analysis of languagetool-org/languagetool@2e990059ce (2026-09-06).
Data as JSON: /api/errors/90a04703736b124c.
Report an issue: GitHub.