stanfordnlp/CoreNLP · critical · RuntimeIOException

Could not load clause splitter model at " + splitterModel

Error message

Could not load clause splitter model at " + splitterModel

What it means

The OpenIE constructor attempts to load the clause splitter model via ClauseSplitter.load(splitterModel). If the model file cannot be read (missing path, wrong format, IO error), the IOException is wrapped in a RuntimeIOException naming the model path. Model loading happens during annotator construction, so this fails immediately when the pipeline is built.

Solutions

  1. Verify the splitter model file exists and is readable at the configured path (or omit the custom path to use the default from the classpath).
  2. Ensure the CoreNLP models jar matching your library version is on the classpath.
  3. Check that the file is a valid serialized model and matches your CoreNLP version; re-download if corrupt.
  4. Catch RuntimeIOException at construction time and report a clear configuration error to the user.

Example fix

// before
props.setProperty("openie.clause_splitter_model", "/models/splitter.gz"); // file missing
// after
File f = new File("/models/splitter.gz");
if (!f.isFile() || !f.canRead()) throw new IllegalArgumentException("Splitter model not found: " + f);
props.setProperty("openie.clause_splitter_model", f.getAbsolutePath());
Defensive patterns

Strategy: try-catch

Validate before calling

java.io.File f = new java.io.File(splitterModelPath);
if (!f.isFile() || !f.canRead()) throw new IllegalArgumentException("Clause splitter model missing/unreadable: " + f);

Try / catch

try {
  openie = new OpenIE(props);
} catch (RuntimeIOException e) {
  throw new IllegalStateException("Bad OpenIE model configuration: " + e.getMessage(), e);
}

Prevention

When it happens

Trigger: Constructing OpenIE (directly or via StanfordCoreNLP with the openie annotator) with a -openie.clause_splitter_model path that does not exist, is unreadable, or is not a valid gzip-serialized ClauseSplitter model.

Common situations: Typos in model file paths; downloading a model for the wrong CoreNLP version; running without the models jar on the classpath; permissions issues on the model file.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


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

Appendix: source

Thrown at src/edu/stanford/nlp/naturalli/OpenIE.java:192

      withoutOpenIEPrefix.setProperty(key.replace("openie.", ""), props.getProperty(key));
    }
    ArgumentParser.fillOptions(this, withoutOpenIEPrefix);

    // Create the clause splitter
    try {
      if (splitterDisable) {
        clauseSplitter = Optional.empty();
      } else {
        if (noModel) {
          log.info("Not loading a splitter model");
          clauseSplitter = Optional.of(ClauseSplitterSearchProblem::new);
        } else {
          clauseSplitter = Optional.of(ClauseSplitter.load(splitterModel));
        }
      }
    } catch (IOException e) {
      //throw new RuntimeIOException("Could not load clause splitter model at " + splitterModel + ": " + e.getClass() + ": " + e.getMessage());
      throw new RuntimeIOException("Could not load clause splitter model at " + splitterModel, e);
    }

    // Create the forward entailer
    try {
      this.weights = ignoreAffinity ? new NaturalLogicWeights(affinityProbabilityCap) : new NaturalLogicWeights(affinityModels, affinityProbabilityCap);
    } catch (IOException e) {
      throw new RuntimeIOException("Could not load affinity model at " + affinityModels + ": " + e.getMessage());
    }
    forwardEntailer = new ForwardEntailer(entailmentsPerSentence, weights);

    // Create the relation segmenter
    segmenter = new RelationTripleSegmenter(allNominals);
  }

  /**
   * Find the clauses in a sentence, where the sentence is expressed as a dependency tree.
   *
   * @param tree The dependency tree representation of the sentence.

View on GitHub (pinned to 1b7edd19c4)