stanfordnlp/CoreNLP · error · RuntimeException

Specified properties are not parsable or not valid!

Error message

Specified properties are not parsable or not valid!

What it means

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.

Solutions

  1. Read the 'Missing required option:' / parse error lines printed to stderr just before the exception; supply or fix each listed option.
  2. Check option names for typos and correct case in the properties file or command line.
  3. Ensure values are parseable to the declared field types (int, double, boolean, etc.).
  4. Run with the ArgumentParser usage printer (e.g. ArgumentParser.fillOptions with usage) to list valid options.

Example fix

// before
props.load(in); // missing required key "iterations"
ArgumentParser.fillOptions(new MyOpts(), props);
// after
props.setProperty("iterations", "10"); // supply all required options
ArgumentParser.fillOptions(new MyOpts(), props);
Defensive patterns

Strategy: validation

Validate before calling

// validate before fillOptions
for (String req : requiredOptionNames) {
  if (!props.containsKey(req)) throw new IllegalArgumentException("Missing required option: " + req);
}

Try / catch

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; } }

Prevention

When it happens

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

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

Understand the failure class

Background: "Must pass :limit option" / "Missing required option" — required option errors explained — this error's family across 41 libraries.

Related errors


AI-assisted analysis of stanfordnlp/CoreNLP@1b7edd19c4 (2026-09-10). Data as JSON: /api/errors/bb0d9a5e830cade8. Report an issue: GitHub.

Appendix: source

Thrown at src/edu/stanford/nlp/util/ArgumentParser.java:483

            }
          }
        }
      }
    }

    //--Ensure Required
    boolean good = true;
    for (Map.Entry<String, Pair<Boolean, Boolean>> entry : required.entrySet()) {
      String key = entry.getKey();
      Pair<Boolean, Boolean> mark = entry.getValue();
      if (mark.first && !mark.second) {
        err("Missing required option: " + interner.get(key) + "   <in class: " + canFill.get(key).getDeclaringClass() + '>');
        required.put(key, Pair.makePair(true, true));  //don't duplicate error messages
        good = false;
      }
    }
    if ( ! good) {
      throw new RuntimeException("Specified properties are not parsable or not valid!");
      //System.exit(1);
    }

    return canFill;
  }

  @SuppressWarnings("UnusedReturnValue")
  private static Map<String, Field> fillOptionsImpl(
          Object[] instances,
          Class<?>[] classes,
          Properties options) {
    return fillOptionsImpl(instances, classes, options, strict, false);
  }


  /*
   * ----------
   * EXECUTION

View on GitHub (pinned to 1b7edd19c4)