{"record":{"id":"0cafc34a81d388f9","repo":"stanfordnlp/CoreNLP","slug":"invalid-sieve-name-sievename","errorCode":null,"errorMessage":"Invalid sieve name: ${sieveName}","messagePattern":"Invalid sieve name: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/dcoref/SieveCoreferenceSystem.java","lineNumber":597,"sourceCode":"      Thread.sleep(Constants.MONITOR_DIST_CMD_FINISHED_WAIT_MILLIS);\n      seconds += Constants.MONITOR_DIST_CMD_FINISHED_WAIT_MILLIS / 1000;\n      if (seconds % 600 == 0) {\n        double minutes = seconds / 60;\n        logger.info(\"Still waiting... \" + minutes + \" minutes have passed.\");\n      }\n    }\n    return true;\n  }\n\n  private static int fromSieveNameToIndex(String sieveName, String[] sieveNames)\n  {\n    if (\"*\".equals(sieveName)) return -1;\n    for (int i = 0; i < sieveNames.length; i++) {\n      if (sieveNames[i].equals(sieveName)) {\n        return i;\n      }\n    }\n    throw new IllegalArgumentException(\"Invalid sieve name: \" + sieveName);\n  }\n\n  private static Pair<Integer,Integer> fromSieveOrderConstraintString(String s, String[] sieveNames)\n  {\n    String[] parts = s.split(\"<\");\n    if (parts.length == 2) {\n      String first = parts[0].trim();\n      String second = parts[1].trim();\n      int a = fromSieveNameToIndex(first, sieveNames);\n      int b = fromSieveNameToIndex(second, sieveNames);\n      return new Pair<>(a, b);\n    } else {\n      throw new IllegalArgumentException(\"Invalid sieve ordering constraint: \" + s);\n    }\n  }\n\n  private static String toSieveOrderConstraintString(Pair<Integer,Integer> orderedSieveIndices, String[] sieveNames)\n  {","sourceCodeStart":579,"sourceCodeEnd":615,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/dcoref/SieveCoreferenceSystem.java#L579-L615","documentation":"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>'.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\ndcoref.optimize.sievesOrder = ExactStringMatches<ProperNounMatch\n// after\ndcoref.optimize.sievesOrder = ExactStringMatch<ProperNounMatch","handlingStrategy":"validation","validationCode":"Set<String> enabled = new HashSet<>(Arrays.asList(props.getProperty(\"dcoref.sieves\").split(\",\")));\nfor (String o : props.getProperty(\"dcoref.optimize.sievesOrder\",\"\").split(\",\")) {\n  String[] sides = o.split(\"<\");\n  for (String s : sides) {\n    String name = s.trim();\n    if (!name.equals(\"*\") && !enabled.contains(name))\n      throw new IllegalArgumentException(\"Unknown sieve in constraint: \" + name);\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  new SieveCoreferenceSystem(props);\n} catch (IllegalArgumentException e) {\n  if (e.getMessage() != null && e.getMessage().startsWith(\"Invalid sieve name\")) {\n    logger.warning(\"Dropping bad constraint set: \" + e.getMessage());\n    props.remove(\"dcoref.optimize.sievesOrder\");\n  } else throw e;\n}","preventionTips":["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"],"tags":["corenlp","coreference","configuration","invalid-identifier"],"backgroundTag":"invalid-argument-value","analyzedSha":"1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a","analyzedAt":"2026-09-10T02:24:07.274Z","contentChangedAt":"2026-09-10T02:24:07.274Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}