{"record":{"id":"90a04703736b124c","repo":"languagetool-org/languagetool","slug":"property-must-be-set-in","errorCode":null,"errorMessage":"Property '' must be set in ","messagePattern":"Property '' must be set in ","errorType":"console","errorClass":"IllegalConfigurationException","httpStatus":null,"severity":"error","filePath":"languagetool-server/src/main/java/org/languagetool/server/HTTPServerConfig.java","lineNumber":1395,"sourceCode":"\n  /** @since 5.2 */\n  public void setNgramLangIdentData(File ngramLangIdentData) {\n    this.ngramLangIdentData = ngramLangIdentData;\n  }\n\n  /** @since 5.2 */\n  @Nullable\n  public File getNgramLangIdentData() {\n    return ngramLangIdentData;\n  }\n\n  /**\n   * @throws IllegalConfigurationException if property is not set\n   */\n  protected String getProperty(Properties props, String propertyName, File config) {\n    String propertyValue = (String)props.get(propertyName);\n    if (propertyValue == null || propertyValue.trim().isEmpty()) {\n      throw new IllegalConfigurationException(\"Property '\" + propertyName + \"' must be set in \" + config);\n    }\n    return propertyValue;\n  }\n\n  protected String getOptionalProperty(Properties props, String propertyName, String defaultValue) {\n    String propertyValue = (String)props.get(propertyName);\n    if (propertyValue == null) {\n      return defaultValue;\n    }\n    return propertyValue;\n  }\n\n  /** @since 5.1 */\n  boolean isPremiumAlways() {\n    return premiumAlways;\n  }\n\n  /** @since 5.1 */","sourceCodeStart":1377,"sourceCodeEnd":1413,"githubUrl":"https://github.com/languagetool-org/languagetool/blob/2e990059ce67d5e2a0f7f7ca5d31160c6709df4b/languagetool-server/src/main/java/org/languagetool/server/HTTPServerConfig.java#L1377-L1413","documentation":"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.","triggerScenarios":"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=`).","commonSituations":"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.","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"],"exampleFix":"// before (properties)\n# dbPassword missing\n// after (properties)\ndbPassword=s3cret","handlingStrategy":"validation","validationCode":"for (String required : List.of(\"dbUsername\", \"dbPassword\")) {\n  String v = props.getProperty(required);\n  if (v == null || v.trim().isEmpty())\n    throw new IllegalStateException(required + \" must be set in \" + configFile);\n}","typeGuard":null,"tryCatchPattern":"try {\n  String val = config.getProperty(props, \"password\", configFile);\n} catch (IllegalConfigurationException e) {\n  LOG.error(\"Missing config property: {}\", e.getMessage());\n  System.exit(1);\n}","preventionTips":["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"],"tags":["configuration","server","missing-property"],"backgroundTag":"missing-required-config","analyzedSha":"2e990059ce67d5e2a0f7f7ca5d31160c6709df4b","analyzedAt":"2026-09-06T09:20:17.015Z","contentChangedAt":"2026-09-06T09:20:17.015Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}