Aaron Kaplan 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.

I'm a bit out of my area of expertise here, but I saw this in the documentation for CVD:

Important: XMI CAS is a serialization format that serializes a CAS without type system and index information. It is therefore impossible to read in a stand-alone XMI CAS file. XMI CAS files can only be interpreted in the context of an existing type system. Consequently, you need to load the AE that was used to create the XMI file to be able to load it.

Did you first load the Analysis Engine (that has the type system specified that matches the type system of the saved XMI CAS), before loading the XMI Cas?

-Marshall

Reply via email to