uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eddie Epstein" <eaepst...@gmail.com>
Subject Re: null fsIndexRepository
Date Tue, 24 Jun 2008 21:07:39 GMT
Hi Aaron,

By chance does the annotator descriptor declare Sofa input or output
capabilities? If so, the CAS passed to process is a base CAS, which has no
index repository.

Here's some code from CasImpl.java

  public FSIndexRepository getIndexRepository() {
    if (this == this.svd.baseCAS) {
      // BaseCas has no indexes for users
      return null;
    }

Eddie

On Tue, Jun 24, 2008 at 9:53 AM, Aaron Kaplan <Aaron.Kaplan@xrce.xerox.com>
wrote:

> My annotator's process method begins like this:
>
>        public void process(JCas jcas) throws AnalysisEngineProcessException
> {
>                FSIndexRepository repo = jcas.getFSIndexRepository();
>
> I'm getting a NullPointerException at the line after that, because repo is
> null.  How can this happen?
>
> Possibly relevant: the CAS I'm processing was loaded by the CVD from an XMI
> file.  In the CVD I see an index called
> blah.blah.blah.MyType_GeneratedIndex, whereas I expected to see an index
>  called MyTypeIndex that we defined.
>
> -Aaron
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message