{"record":{"id":"3643c6f076abdd57","repo":"stanfordnlp/CoreNLP","slug":"no-annotator-named-name","errorCode":null,"errorMessage":"No annotator named \" + name","messagePattern":"No annotator named \" \\+ name","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/pipeline/AnnotatorPool.java","lineNumber":151,"sourceCode":"      }\n    }\n  }\n\n  /**\n   * Retrieve an Annotator from the pool. If the named Annotator has not yet\n   * been requested, it will be created. Otherwise, the existing instance of\n   * the Annotator will be returned.\n   *\n   * @param name The annotator to retrieve from the pool\n   * @return The annotator\n   * @throws IllegalArgumentException If the annotator cannot be created\n   */\n  public synchronized Annotator get(String name) {\n    CachedAnnotator factory =  this.cachedAnnotators.get(name);\n    if (factory != null) {\n      return factory.annotator.get();\n    } else {\n      throw new IllegalArgumentException(\"No annotator named \" + name);\n    }\n  }\n\n\n  /**\n   * A global singleton annotator pool, so that we can cache globally on a JVM instance.\n   */\n  public static final AnnotatorPool SINGLETON = new AnnotatorPool();\n\n}\n","sourceCodeStart":133,"sourceCodeEnd":162,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/pipeline/AnnotatorPool.java#L133-L162","documentation":"AnnotatorPool.get(name) looks up a pre-registered annotator factory by name; if the name was never added to the pool it throws IllegalArgumentException('No annotator named X'). It is an internal registry lookup, so the name must exactly match one registered via add().","triggerScenarios":"Requesting an annotator name from the pool (via AnnotatorPool.get or StanfordCoreNLP resolving the 'annotators' property) that was never registered, e.g. a typo like 'ner ' or 'postager', or using a custom annotator without calling pool.add(name, factory).","commonSituations":"Typo in the 'annotators' property string; using a custom annotator name without registering it in the pool; case-sensitivity mismatch; stale code referencing an annotator removed/renamed between CoreNLP versions.","solutions":["Correct the annotator name in your 'annotators' property to a valid built-in name (tokenize,ssplit,pos,lemma,ner,parse,depparse,etc.)","If it is a custom annotator, register it with AnnotatorPool.add(name, factory) before get()","Check for whitespace/case errors and trailing commas in the annotators list"],"exampleFix":"// before\nprops.setProperty(\"annotators\", \"tokenize, ssplit,pos\"); // space yields bad name lookup\n// after\nprops.setProperty(\"annotators\", \"tokenize,ssplit,pos\");","handlingStrategy":"validation","validationCode":"String[] names = props.getProperty(\"annotators\").split(\",\");\nfor (String n : names) {\n  String t = n.trim();\n  if (t.isEmpty() || !KNOWN_ANNOTATORS.contains(t)) throw new IllegalArgumentException(\"Unknown annotator: \" + t);\n}","typeGuard":null,"tryCatchPattern":"try {\n  Annotator a = pool.get(name);\n} catch (IllegalArgumentException e) {\n  // log e.getMessage(): 'No annotator named X' and list valid names\n}","preventionTips":["Validate names in the annotators property against the known set before creating a pipeline","Register custom annotators with pool.add() before get()","Avoid stray spaces/commas in the annotators list"],"tags":["stanford-corenlp","annotator-registry","invalid-name","configuration"],"backgroundTag":"resource-not-found","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"}