Return-Path: Delivered-To: apmail-incubator-uima-user-archive@locus.apache.org Received: (qmail 78224 invoked from network); 30 Oct 2007 09:50:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Oct 2007 09:50:59 -0000 Received: (qmail 81121 invoked by uid 500); 30 Oct 2007 09:50:46 -0000 Delivered-To: apmail-incubator-uima-user-archive@incubator.apache.org Received: (qmail 81097 invoked by uid 500); 30 Oct 2007 09:50:46 -0000 Mailing-List: contact uima-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: uima-user@incubator.apache.org Delivered-To: mailing list uima-user@incubator.apache.org Received: (qmail 81088 invoked by uid 99); 30 Oct 2007 09:50:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Oct 2007 02:50:46 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [67.18.27.130] (HELO gator74.hostgator.com) (67.18.27.130) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Oct 2007 09:51:00 +0000 Received: from ool-44c6c63b.dyn.optonline.net ([68.198.198.59]:32200 helo=[192.168.1.100]) by gator74.hostgator.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1ImnkJ-0008Mu-HS for uima-user@incubator.apache.org; Tue, 30 Oct 2007 04:50:51 -0500 Message-ID: <4726FE36.8030807@schor.com> Date: Tue, 30 Oct 2007 05:49:42 -0400 From: Marshall Schor User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: uima-user@incubator.apache.org Subject: Re: Exception in a pipeline with more than one document to analize References: <63e2e4460710240558l7e51f9d2i2f9da03b68a744e6@mail.gmail.com> <4720582C.8020105@gmx.de> <63e2e4460710250235w5cba90e2u9b6106e05630b317@mail.gmail.com> <4721E469.5070103@gmx.de> <47228C04.4070709@schor.com> <472677F8.2000807@schor.com> <63e2e4460710300146x7f9a6ebfi2181c08e3416294b@mail.gmail.com> In-Reply-To: <63e2e4460710300146x7f9a6ebfi2181c08e3416294b@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator74.hostgator.com X-AntiAbuse: Original Domain - incubator.apache.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - schor.com X-Virus-Checked: Checked by ClamAV on apache.org Thanks Roberto - Upon further investigation - it appears to be a synchronization problem. I was incorrect in saying that the implementation assumes "that the JCas has been previously initialized for this type (which was not "loadable" when the JCas was initialized earlier)." There is in fact code to handle this case. But it appears it may not be threadsafe. -Marshall Roberto Franchini wrote: > On 10/30/07, Marshall Schor 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! > > > >