stanfordnlp/CoreNLP · error · IllegalArgumentException
Invalid sieve name
Error message
Invalid sieve name: ${sieveName} What it means
fromSieveNameToIndex resolves a sieve name from an ordering constraint to its index in the configured sieve list; '*' is mapped to -1 (ANY). If the name matches no configured sieve (and is not '*'), it throws an IllegalArgumentException 'Invalid sieve name: <sieveName>'.
Solutions
- Use exact simple sieve names that appear in the configured dcoref.sieves list (e.g. ExactStringMatch, ProperNounMatch)
- Cross-check the constraint names against the sieves property so every referenced sieve is enabled
- Use '*' only for the ANY wildcard, once per side as allowed
- Log/print the sieveNames array for your configuration to see the accepted set
Example fix
// before dcoref.optimize.sievesOrder = ExactStringMatches<ProperNounMatch // after dcoref.optimize.sievesOrder = ExactStringMatch<ProperNounMatch
Defensive patterns
Strategy: validation
Validate before calling
Set<String> enabled = new HashSet<>(Arrays.asList(props.getProperty("dcoref.sieves").split(",")));
for (String o : props.getProperty("dcoref.optimize.sievesOrder","").split(",")) {
String[] sides = o.split("<");
for (String s : sides) {
String name = s.trim();
if (!name.equals("*") && !enabled.contains(name))
throw new IllegalArgumentException("Unknown sieve in constraint: " + name);
}
} Try / catch
try {
new SieveCoreferenceSystem(props);
} catch (IllegalArgumentException e) {
if (e.getMessage() != null && e.getMessage().startsWith("Invalid sieve name")) {
logger.warning("Dropping bad constraint set: " + e.getMessage());
props.remove("dcoref.optimize.sievesOrder");
} else throw e;
} Prevention
- Reference only sieves listed in your dcoref.sieves property
- Use simple class names exactly as configured, not qualified names
- After CoreNLP upgrades, diff sieve class names against the new version
- Keep the sieve list and ordering constraints in one file so they stay in sync
When it happens
Trigger: Writing a sieve ordering constraint (in the sieve-ordering / OPTIMIZE_SIEVES_ORDER_PROP property) that references a sieve class name not present in the current sieveNames array — misspelled class short name, a sieve not enabled, or a sieve removed/renamed in a newer CoreNLP version.
Common situations: Copy-pasting sieve names from tutorials into a props file that enables a different sieve set; using fully-qualified class names when only simple names are accepted (or vice versa); upgrading CoreNLP where a DeterministicCorefSieve subclass was renamed.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Invalid metric type for
- Invalid ordering constraint
- Cannot have these two ordering constraints
- Cannot have these two ordering constraints
- No input file specified!
AI-assisted analysis of stanfordnlp/CoreNLP@1b7edd19c4 (2026-09-10).
Data as JSON: /api/errors/0cafc34a81d388f9.
Report an issue: GitHub.
Appendix: source
Thrown at src/edu/stanford/nlp/dcoref/SieveCoreferenceSystem.java:597
Thread.sleep(Constants.MONITOR_DIST_CMD_FINISHED_WAIT_MILLIS);
seconds += Constants.MONITOR_DIST_CMD_FINISHED_WAIT_MILLIS / 1000;
if (seconds % 600 == 0) {
double minutes = seconds / 60;
logger.info("Still waiting... " + minutes + " minutes have passed.");
}
}
return true;
}
private static int fromSieveNameToIndex(String sieveName, String[] sieveNames)
{
if ("*".equals(sieveName)) return -1;
for (int i = 0; i < sieveNames.length; i++) {
if (sieveNames[i].equals(sieveName)) {
return i;
}
}
throw new IllegalArgumentException("Invalid sieve name: " + sieveName);
}
private static Pair<Integer,Integer> fromSieveOrderConstraintString(String s, String[] sieveNames)
{
String[] parts = s.split("<");
if (parts.length == 2) {
String first = parts[0].trim();
String second = parts[1].trim();
int a = fromSieveNameToIndex(first, sieveNames);
int b = fromSieveNameToIndex(second, sieveNames);
return new Pair<>(a, b);
} else {
throw new IllegalArgumentException("Invalid sieve ordering constraint: " + s);
}
}
private static String toSieveOrderConstraintString(Pair<Integer,Integer> orderedSieveIndices, String[] sieveNames)
{View on GitHub (pinned to 1b7edd19c4)