Return-Path: Delivered-To: apmail-incubator-uima-user-archive@minotaur.apache.org Received: (qmail 29103 invoked from network); 3 Feb 2010 13:52:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Feb 2010 13:52:26 -0000 Received: (qmail 149 invoked by uid 500); 3 Feb 2010 13:52:25 -0000 Delivered-To: apmail-incubator-uima-user-archive@incubator.apache.org Received: (qmail 99990 invoked by uid 500); 3 Feb 2010 13:52:25 -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 99979 invoked by uid 99); 3 Feb 2010 13:52:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Feb 2010 13:52:25 +0000 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: domain of msa@schor.com designates 74.52.223.18 as permitted sender) Received: from [74.52.223.18] (HELO gateway07.websitewelcome.com) (74.52.223.18) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 03 Feb 2010 13:52:15 +0000 Received: (qmail 1820 invoked from network); 3 Feb 2010 13:52:35 -0000 Received: from gator74.hostgator.com (67.18.27.130) by gateway07.websitewelcome.com with SMTP; 3 Feb 2010 13:52:35 -0000 Received: from yktgi01e0-s5.watson.ibm.com ([129.34.20.19]:22139 helo=[9.2.35.72]) by gator74.hostgator.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1Ncfe5-0007oV-J9 for uima-user@incubator.apache.org; Wed, 03 Feb 2010 07:51:53 -0600 Message-ID: <4B697F7D.6020008@schor.com> Date: Wed, 03 Feb 2010 08:51:57 -0500 From: Marshall Schor User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: uima-user@incubator.apache.org Subject: Re: CPM class usage References: <4B696548.70400@schor.com> In-Reply-To: X-Enigmail-Version: 0.96.0 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 - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - schor.com X-Virus-Checked: Checked by ClamAV on apache.org Radwen ANIBA wrote: > Thank you for your email > > addCasProcessor is not recognized as a method for CPMImpl, there is > addCasConsumer but I don't know if it does the same thing > It's not the same thing. I see addCasProcessor is a method in BaseCPMImpl, and CPMImpl inherits from BaseCPMImpl. So you should be able to use this method. -Marshall > 2010/2/3 Marshall Schor > > >> Radwen ANIBA wrote: >> >>> Hello, >>> >>> I have devoloped a serie of AEs that I tested through CPE GUI,and now I'm >>> trying to write a java aplication using these AEs and trying to do th >>> >> same >> >>> thing as CPE GUI. So I took as reference SimpleRunCPM example and I made >>> these changes >>> >>> // create a new Collection Processing Manager >>> mCPM = UIMAFramework.newCollectionProcessingManager(); >>> >>> // Register AE and CAS Consumer with the CPM >>> mCPM.setAnalysisEngine(ae1); >>> mCPM.setAnalysisEngine(ae2); >>> mCPM.setAnalysisEngine(ae3); >>> mCPM.setAnalysisEngine(ae4); >>> >>> Notice here I have 4 ae and not only one >>> >>> So when running this I have an error message in >>> >> mCPM.setAnalysisEngine(ae2) >> >>> saying >>> >>> Initializing AnalysisEngines >>> Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, >>> Size: 0 >>> at java.util.LinkedList.entry(LinkedList.java:365) >>> at java.util.LinkedList.remove(LinkedList.java:357) >>> at >>> >>> >> org.apache.uima.collection.impl.cpm.engine.CPMEngine.removeCasProcessor(CPMEngine.java:1188) >> >>> at >>> >>> >> org.apache.uima.collection.impl.cpm.BaseCPMImpl.removeCasProcessor(BaseCPMImpl.java:361) >> >>> at >>> >>> >> org.apache.uima.collection.impl.cpm.CPMImpl.setAnalysisEngine(CPMImpl.java:70) >> >>> So I don't know what is really the problem, if CPM do not take up to one >>> >> ae >> >>> or this is a problem in ae2 that I already tried without any bug. >>> >>> >> Looking at the code, it appears that the CPMImpl class has two different >> approaches for managing Analysis Engines AE. One approach assumes there >> is only one AE. This approach is used with methods like >> setAnalysisEngine, getAnalysisEngine, etc. These set and remove the one >> (and only) AE. If you try and set more than one AE, the previously set >> AE is removed, and the next AE is substituted for it, which is not what >> you are trying to do, of course. >> >> There are other methods that permit multiple analysis engines. These >> are methods like addCasProcessor. >> >> Try changing setAnalysisEngine to addCasProcessor. >> >> The error stack trace reveals this part of the framework code is buggy. >> I'll submit a bug report. >> >> -Marshall >> >> >>> Any idea ? >>> >>> Thx >>> >>> Rad >>> >>> >>> > >