{"record":{"id":"460b709af119911d","repo":"languagetool-org/languagetool","slug":"parameter-config-must-be-set-and-point-to-a-prop","errorCode":null,"errorMessage":"Parameter --config must be set and point to a property file","messagePattern":"Parameter --config must be set and point to a property file","errorType":"console","errorClass":"IllegalConfigurationException","httpStatus":null,"severity":"error","filePath":"languagetool-server/src/main/java/org/languagetool/server/HTTPSServerConfig.java","lineNumber":83,"sourceCode":"    this.keystore = keystore;\n    this.keyStorePassword = keyStorePassword;\n    this.requestLimit = requestLimit;\n    this.requestLimitPeriodInSeconds = requestLimitPeriodInSeconds;\n  }\n\n  /**\n   * Parse command line options and load settings from property file.\n   */\n  HTTPSServerConfig(String[] args) {\n    super(args);\n    File config = null;\n    for (int i = 0; i < args.length; i++) {\n      if (\"--config\".equals(args[i])) {\n        config = new File(args[++i]);\n      }\n    }\n    if (config == null) {\n      throw new IllegalConfigurationException(\"Parameter --config must be set and point to a property file\");\n    }\n    try {\n      Properties props = new Properties();\n      try (FileInputStream fis = new FileInputStream(config)) {\n        props.load(fis);\n        keystore = new File(getProperty(props, \"keystore\", config));\n        keyStorePassword = getProperty(props, \"password\", config);\n      }\n    } catch (IOException e) {\n      throw new RuntimeException(\"Could not load properties from '\" + config + \"'\", e);\n    }\n  }\n\n  File getKeystore() {\n    return keystore;\n  }\n\n  String getKeyStorePassword() {","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/languagetool-org/languagetool/blob/2e990059ce67d5e2a0f7f7ca5d31160c6709df4b/languagetool-server/src/main/java/org/languagetool/server/HTTPSServerConfig.java#L65-L101","documentation":"HTTPSServerConfig's command-line parser requires a --config argument pointing to a properties file; if it is absent, it throws IllegalConfigurationException('Parameter --config must be set and point to a property file'). The HTTPS server cannot start without its keystore configuration.","triggerScenarios":"Launching HTTPSServer main without --config, or with a misspelled flag.","commonSituations":"Startup script omits the flag; flag typo (--conf/--configs); copying the plain HTTP server's command line, which has different requirements; systemd/docker CMD missing the argument.","solutions":["Add --config /path/to/server.properties to the launch command.","Correct the flag spelling and ensure a path value follows --config.","Create a properties file containing at least 'keystore' and 'password' entries.","See https://dev.languagetool.org/http-server for the expected properties format."],"exampleFix":"// before\njava -cp languagetool-server.jar org.languagetool.server.HTTPSServer\n// after\njava -cp languagetool-server.jar org.languagetool.server.HTTPSServer --config server.properties","handlingStrategy":"validation","validationCode":"// before launching\nif (args == null || !Arrays.asList(args).contains(\"--config\")) {\n  throw new IllegalArgumentException(\"--config <server.properties> is required\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  HTTPSServer.main(args);\n} catch (IllegalConfigurationException e) {\n  System.err.println(e.getMessage());\n  System.err.println(\"Usage: HTTPSServer --config server.properties\");\n  System.exit(1);\n}","preventionTips":["Wrap the launch command in a script that injects --config","Validate CLI arguments in entrypoint scripts/systemd units","Never copy the plain HTTP server command line for the HTTPS server"],"tags":["cli","configuration","missing-argument"],"backgroundTag":"missing-required-flag","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"}