{"record":{"id":"95c250d35bfff579","repo":"stanfordnlp/CoreNLP","slug":"no-input-file-specified","errorCode":null,"errorMessage":"No input file specified!","messagePattern":"No input file specified!","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/dcoref/SieveCoreferenceSystem.java","lineNumber":358,"sourceCode":"    logger.fine(props.toString());\n    Constants.printConstants(logger);\n\n    // initialize coref system\n    SieveCoreferenceSystem corefSystem = new SieveCoreferenceSystem(props);\n\n    // MentionExtractor extracts MUC, ACE, or CoNLL documents\n    MentionExtractor mentionExtractor;\n    if (props.containsKey(Constants.MUC_PROP)){\n      mentionExtractor = new MUCMentionExtractor(corefSystem.dictionaries, props,\n                                                 corefSystem.semantics, corefSystem.singletonPredictor);\n    } else if(props.containsKey(Constants.ACE2004_PROP) || props.containsKey(Constants.ACE2005_PROP)) {\n      mentionExtractor = new ACEMentionExtractor(corefSystem.dictionaries, props,\n                                                 corefSystem.semantics, corefSystem.singletonPredictor);\n    } else if (props.containsKey(Constants.CONLL2011_PROP)) {\n      mentionExtractor = new CoNLLMentionExtractor(corefSystem.dictionaries, props,\n                                                   corefSystem.semantics, corefSystem.singletonPredictor);\n    } else {\n      throw new RuntimeException(\"No input file specified!\");\n    }\n\n    if (!Constants.USE_GOLD_MENTIONS) {\n      // Set mention finder\n      String mentionFinderClass = props.getProperty(Constants.MENTION_FINDER_PROP);\n      if (mentionFinderClass != null) {\n        String mentionFinderPropFilename = props.getProperty(Constants.MENTION_FINDER_PROPFILE_PROP);\n        CorefMentionFinder mentionFinder;\n        if (mentionFinderPropFilename != null) {\n          Properties mentionFinderProps = new Properties();\n          try (FileInputStream fis = new FileInputStream(mentionFinderPropFilename)) {\n            mentionFinderProps.load(fis);\n          }\n          mentionFinder = (CorefMentionFinder) Class.forName(mentionFinderClass).getConstructor(Properties.class).newInstance(mentionFinderProps);\n        } else {\n          mentionFinder = (CorefMentionFinder) Class.forName(mentionFinderClass).newInstance();\n        }\n        mentionExtractor.setMentionFinder(mentionFinder);","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/dcoref/SieveCoreferenceSystem.java#L340-L376","documentation":"initializeAndRunCoref chooses a MentionExtractor based on which input property is present: a test file (dcoref/conll2012 test properties), ACE input (Constants.ACE_PROP), or CoNLL-2011 input (Constants.CONLL2011_PROP). If none of these input properties is set, there is no data source, so it throws a RuntimeException 'No input file specified!'.","triggerScenarios":"Running the SieveCoreferenceSystem via main (or initializeAndRunCoref directly) with a properties object that sets neither the MUC/test-file property, nor Constants.ACE_PROP, nor Constants.CONLL2011_PROP.","commonSituations":"Running coref from the command line with a props file missing the input key; renaming/migrating property keys between CoreNLP versions; building a Properties object programmatically and forgetting the input entry; expecting the system to read plain text when it only accepts MUC/ACE/CoNLL formatted corpora.","solutions":["Set the appropriate input property in your coref properties file (e.g. dcoref.conll2011=PATH, the ACE property, or the test-file property) before running","Point the property at an existing, correctly formatted input file","Check the exact property keys in edu.stanford.nlp.dcoref.Constants for your CoreNLP version (they changed over releases)","If running coref on raw text, use the coref annotator in the pipeline (annotators=...,coref) rather than SieveCoreferenceSystem.main, which is corpus-oriented"],"exampleFix":"// before\ncoref.props:\n  dcoref.sieves = ...\n// after\ncoref.props:\n  dcoref.sieves = ...\n  dcoref.conll2011 = /data/conll2011/test/path","handlingStrategy":"validation","validationCode":"String[] keys = {\"dcoref.conll2011\", \"dcoref.ace\", \"dcoref.test\" /* check Constants for exact names */};\nboolean hasInput = false;\nfor (String k : keys) if (props.containsKey(k)) { hasInput = true; }\nif (!hasInput) throw new IllegalArgumentException(\n  \"Set one of \" + Arrays.toString(keys) + \" (see Constants.*_PROP) before running coref\");","typeGuard":null,"tryCatchPattern":"try {\n  SieveCoreferenceSystem.initializeAndRunCoref(props);\n} catch (RuntimeException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"No input file specified\")) {\n    logger.severe(\"No corpus input configured; set the ACE/CoNLL/test-file property.\");\n  } else throw e;\n}","preventionTips":["Start from an official CoreNLP example coref properties file that includes an input key","Verify property key names against Constants in your exact CoreNLP version","Fail fast in your own launcher: check for an input property before invoking the system","Use the pipeline coref annotator for raw text instead of the corpus-oriented main entry point"],"tags":["corenlp","coreference","configuration","missing-input"],"backgroundTag":"missing-required-config-field","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"}