{"record":{"id":"bb0d9a5e830cade8","repo":"stanfordnlp/CoreNLP","slug":"specified-properties-are-not-parsable-or-not-valid","errorCode":null,"errorMessage":"Specified properties are not parsable or not valid!","messagePattern":"Specified properties are not parsable or not valid!","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/util/ArgumentParser.java","lineNumber":483,"sourceCode":"            }\n          }\n        }\n      }\n    }\n\n    //--Ensure Required\n    boolean good = true;\n    for (Map.Entry<String, Pair<Boolean, Boolean>> entry : required.entrySet()) {\n      String key = entry.getKey();\n      Pair<Boolean, Boolean> mark = entry.getValue();\n      if (mark.first && !mark.second) {\n        err(\"Missing required option: \" + interner.get(key) + \"   <in class: \" + canFill.get(key).getDeclaringClass() + '>');\n        required.put(key, Pair.makePair(true, true));  //don't duplicate error messages\n        good = false;\n      }\n    }\n    if ( ! good) {\n      throw new RuntimeException(\"Specified properties are not parsable or not valid!\");\n      //System.exit(1);\n    }\n\n    return canFill;\n  }\n\n  @SuppressWarnings(\"UnusedReturnValue\")\n  private static Map<String, Field> fillOptionsImpl(\n          Object[] instances,\n          Class<?>[] classes,\n          Properties options) {\n    return fillOptionsImpl(instances, classes, options, strict, false);\n  }\n\n\n  /*\n   * ----------\n   * EXECUTION","sourceCodeStart":465,"sourceCodeEnd":501,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/util/ArgumentParser.java#L465-L501","documentation":"ArgumentParser.fillOptionsImpl validates all options after filling: if any required option is missing, or any value failed to parse, it prints individual err() messages and then throws this RuntimeException as the aggregate failure signal. It means the supplied properties could not be parsed or did not satisfy the declared constraints.","triggerScenarios":"Calling fillOptions/fillOptionsImpl (or bootstrapMap) with a Properties set that omits a required @Option, or supplies a value that fails type parsing/validation — flagged via good=false before the throw.","commonSituations":"Forgot to pass a required flag on the command line; properties file missing keys; value of wrong type (e.g. \"abc\" for an int option); typo in option name so required option appears missing.","solutions":["Read the 'Missing required option:' / parse error lines printed to stderr just before the exception; supply or fix each listed option.","Check option names for typos and correct case in the properties file or command line.","Ensure values are parseable to the declared field types (int, double, boolean, etc.).","Run with the ArgumentParser usage printer (e.g. ArgumentParser.fillOptions with usage) to list valid options."],"exampleFix":"// before\nprops.load(in); // missing required key \"iterations\"\nArgumentParser.fillOptions(new MyOpts(), props);\n// after\nprops.setProperty(\"iterations\", \"10\"); // supply all required options\nArgumentParser.fillOptions(new MyOpts(), props);","handlingStrategy":"validation","validationCode":"// validate before fillOptions\nfor (String req : requiredOptionNames) {\n  if (!props.containsKey(req)) throw new IllegalArgumentException(\"Missing required option: \" + req);\n}","typeGuard":null,"tryCatchPattern":"try { ArgumentParser.fillOptions(opts, props); } catch (RuntimeException e) { if (e.getMessage().contains(\"not parsable or not valid\")) { // detailed errors already on stderr; show usage and exit(2) } else { throw e; } }","preventionTips":["Keep a canonical properties template listing every required key.","Validate option value types in a dry run before launching long jobs.","Check stderr above the exception for the per-option error lines."],"tags":["configuration","argument-parser","missing-required-option","properties"],"backgroundTag":"missing-required-option","analyzedSha":"1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a","analyzedAt":"2026-09-10T02:24:07.274Z","contentChangedAt":"2026-09-10T02:24:07.274Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}