uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roberto Franchini" <ro.franch...@gmail.com>
Subject Re: Exception in a pipeline with more than one document to analize
Date Tue, 30 Oct 2007 08:46:30 GMT
On 10/30/07, Marshall Schor <msa@schor.com> wrote:
> I have written a test case, and can reproduce problems like this (not
> sure I'm reproducing the exact problem yet).
> There may be several issues here to fix.  The first one I came across is
> due to the following:
> A pear component does a "new Sentence(...)" call, where Sentence is a
> JCas type corresponding to a CAS type, but only defined in the pear
> component.  This currently fails, solidly, as follows:

The type system is not defined in the pear. Thea pear (JAPE pear) uses
the one defined outside.
The type system is enclosed in a jar, and the pear hasn't that jar, so
it should use the one from the default classloader, not from the pear
class loader.

> * before starting, a "merged" type system is constructed; it includes
> the Sentence CAS type.
> * a previous annotator makes use of the JCas, causing the JCas to be
> instantiated (this is done lazily, on the first need).  At the time it
> is instantiated, a JCas cover class for the CAS type "Sentence" is
> attempted to be loaded, but because it isn't defined, except in the
> Pear, it is not found.  (This is normal - there is no requirement that
> all CAS type have corresponding JCas types).

The Sentence annotator is the first one in the pipeline, The JAPE one
is the 4th. The jape annotator has a mapper the reads all the
annotations in the CAS and produces GATE annotation:
-a CAS is mapped on a GATE documet
-each UIMA annotation is mapped on a GATE ones
-each UIMA feature (for each annotation) is mapped on GATE ones: this
os the difficult part, since GATE has no knowlege of features type, or
maybe I don't understand how to do that :)

> * (Bug appears now) When the Pear component's process method is called,
> the Java Class loaders are properly switched, and the process method
> call of "new Sentence(...)" proceeds to run.  However, this presumes
> that the JCas has been previously initialized for this type (which was
> not "loadable" when the JCas was initialized earlier).  So - as a
> result, this type is "missing" from internal JCas tables, which causes
> the message

It happens when the mapper READS annotations from CAS to produce GATE's ones.

> JCAS cover class "it.celi.types.Sentence_Type" could not be loaded.
> I'll work on a fix for this; I'm not sure what the cleanest way to
> approach this, yet.  It's also not clear to me that this could/would
> explain the failure mode Roberto reported, so there may be more
> investigating to do.

What I don't understand is why it works fine on documents number
1,3,5.... and fails on ducuments number 2,4,6,....

Thanks a lot for your work!

Roberto Franchini
CELI s.r.l.  (http://www.celi.it) - C.so Moncalieri 21 - 10131 Torino - ITALY
Tel +39-011-6600814 - Fax +39-011-6600687
jabber:ro.franchini@gmail.com skype:ro.franchini

View raw message