Return-Path: X-Original-To: apmail-uima-user-archive@www.apache.org Delivered-To: apmail-uima-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 36E8E9ABE for ; Mon, 17 Oct 2011 23:01:24 +0000 (UTC) Received: (qmail 39307 invoked by uid 500); 17 Oct 2011 23:01:23 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 39275 invoked by uid 500); 17 Oct 2011 23:01:23 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 39267 invoked by uid 99); 17 Oct 2011 23:01:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2011 23:01:23 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.139.91.228] (HELO nm25-vm0.bullet.mail.sp2.yahoo.com) (98.139.91.228) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 17 Oct 2011 23:01:13 +0000 Received: from [98.139.91.68] by nm25.bullet.mail.sp2.yahoo.com with NNFMP; 17 Oct 2011 23:00:51 -0000 Received: from [98.139.91.50] by tm8.bullet.mail.sp2.yahoo.com with NNFMP; 17 Oct 2011 23:00:51 -0000 Received: from [127.0.0.1] by omp1050.mail.sp2.yahoo.com with NNFMP; 17 Oct 2011 23:00:51 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 817052.4287.bm@omp1050.mail.sp2.yahoo.com Received: (qmail 75074 invoked by uid 60001); 17 Oct 2011 23:00:51 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1318892451; bh=U8lGHo0Z3Rog7i37+t5ddJiut5UwO1WXx2r6O3UUIkQ=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=XT4Kpam6Q4EBDNbYVP3Z7USafA2iClwjy2LU+4ow20dj+tRxZ5NL6t2W1lSR7Zbuat12NxgWiLBQBqrfbr12fUfLmZ2wtTDJINyIRb6TCDJ0H/sF++nuw8SpC0rjdETpoGKQ7/9W86WqSmJHXrSi7WYMuc8eNYQR0e0qQ0Qew5s= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=URk7vQfxtSByKUa7qaZdk+GinNrL9zJxe6AfurOijsJLqiR5ub3rK6w2q30qk4wNK0OAbyl1PuoMI9heR2OIhQhQymD803fhzBtztGBk4r3YzNfdYXp/gmiRl8Ede+6iyxIaaMLcKWSLPQ1s7+9uazrSZWpYnzjbcMZ3UwkTgRE=; X-YMail-OSG: ILP3DVEVM1kn0uML75fnW0FuPA048N9ME3I1cGS7ZGmMEdY f3HF7LRa8NGIgCTaFVhCV9roPvZHcN2rd0fwTKJMlEJzWw1IPq.IW_sINRUp kK4ShjJ7XF6gMVfxxDRRr6HPbzu2LmgXZ1Pq_qUDYyIh1iLA5Qzt11MBSPdb QGGZrg55u8iVcYNksLRwqYG_gGeXBnH7YSQELzjfUsFWTCaWBSlKgOixXUjn RCyPutcu8ykEoROr3QGiKJRwF5Qo1dZ5Qa4Kud7bH_PM8rsfg7yRJGA9NOZT lgpFtl9Wm9bumeScLT8tAdcfohjEgTNNreDBWzhnPA2gcHiZiMLFEUq35TkD 9XL.c1WIJ.vidvJhEj2pZ1ADlVYlk2_QcKjEnmVG1ye62wboo2WXgu_Vklrk lD3GNMrsfjz0bBIrFXHHDd1QCtN8zKydzNxMezs2UcWMjzf9Fp3jD4Wrw7V0 Z3r4x_XMRj3BuOq6pfGxADfmfB54- Received: from [115.238.132.118] by web110411.mail.gq1.yahoo.com via HTTP; Mon, 17 Oct 2011 16:00:50 PDT X-Mailer: YahooMailWebService/0.8.114.317681 References: <1318633750.69470.YahooMailNeo@web110410.mail.gq1.yahoo.com> <4E99157D.4090509@schor.com> <1318710102.2743.YahooMailNeo@web110413.mail.gq1.yahoo.com> Message-ID: <1318892450.92319.YahooMailNeo@web110411.mail.gq1.yahoo.com> Date: Mon, 17 Oct 2011 16:00:50 -0700 (PDT) From: Xue-Feng Yang Reply-To: Xue-Feng Yang Subject: Re: ConcurrentModificationException problems To: "user@uima.apache.org" In-Reply-To: <1318710102.2743.YahooMailNeo@web110413.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-280924705-77698155-1318892450=:92319" X-Virus-Checked: Checked by ClamAV on apache.org ---280924705-77698155-1318892450=:92319 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Marshall.I resolved this problems by changing the algorithms.=0A=0A= =0A=0A________________________________=0AFrom: Xue-Feng Yang =0ATo: "user@uima.apache.org" =0ASent: Saturda= y, October 15, 2011 4:21:42 PM=0ASubject: Re: ConcurrentModificationExcepti= on problems=0A=0A=0AThanks Marshall. This is possible the reason.=A0 I'll d= ebug this later when I have time.=0A=0A=0A=0A______________________________= __=0AFrom: Marshall Schor =0ATo: user@uima.apache.org=0ASent= : Saturday, October 15, 2011 1:09:17 AM=0ASubject: Re: ConcurrentModificati= onException problems=0A=0AThis error can happen when you are running an ite= rator over some index, and are=0Aperhaps inside the loop are adding=0A Feat= ure Structures to that same index.=0A=0AFrom the stack trace, I would sugge= st looking around line 127 in your=0AEnDicAnnotator, to see if you are perh= aps adding a new FeatureStructure to the=0Aindexes.=0A=0A-Marshall=0A=0A=0A= On 10/14/2011 7:09 PM, Xue-Feng Yang wrote:=0A> I have an annotator with a = Set variable which reads data in initialize(UimaContext) from a fil= e via parameter configuration in UimaContext. When debugging, it is OK at f= irst 2 steps checks.contains(shingle) returned true. However, when called c= hecks.contains(shingle) at the 36th, it throws an exception =0A>=0A>=0A> An= alysisEngineProcessException: Annotator processing failed=0A> Caused by: ja= va.util.ConcurrentModificationException=0A> In my part of the code, after i= nitialized, the variable is never modified and only the method "contains" i= s called. I also tried to create the variable in=0A>=0A> Set checks= =3D=0A Collections.synchronizedSet(new HashSet());=0A>=0A>=0A> and= not to test in JUnit, but the problem remains the same.=0A>=0A>=0A> After = removing the code unit with "contains", it can go through.=0A>=0A> Any idea= ?=0A>=0A> Xue-Feng=0A>=0A> /////////////////////////////=0A>=0A> Oct 14, 20= 11 5:57:26 PM org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_= impl callAnalysisComponentProcess(405)=0A> SEVERE: Exception occurred=0A> o= rg.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator pr= ocessing failed.=A0 =A0 =0A>=A0 =A0 at org.apache.uima.analysis_engine.imp= l.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalys= isEngine_impl.java:391)=0A>=A0 =A0 at org.apache.uima.analysis_engine.impl= .PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEng= ine_impl.java:295)=0A>=A0 =A0 at=0A org.apache.uima.analysis_engine.impl.A= nalysisEngineImplBase.process(AnalysisEngineImplBase.java:267)=0A>=A0 =A0 = at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(Anal= ysisEngineImplBase.java:280)=0A>=A0 =A0 at com.norvar.uima.test.utils.Test= Utils.runAE(TestUtils.java:48)=0A>=A0 =A0 at com.norvar.uima.en_places.tes= t.EnPlacesTest.testPlacesAE(EnPlacesTest.java:41)=0A>=A0 =A0 at com.norvar= .uima.en_places.test.EnPlacesTest.main(EnPlacesTest.java:20)=0A> Caused by:= java.util.ConcurrentModificationException=0A>=A0 =A0 at org.apache.uima.c= as.impl.FSIndexRepositoryImpl$PointerIterator.checkConcurrentModification(F= SIndexRepositoryImpl.java:246)=0A>=A0 =A0 at org.apache.uima.cas.impl.FSIn= dexRepositoryImpl$PointerIterator.ll_get(FSIndexRepositoryImpl.java:537)=0A= >=A0 =A0 at=0A org.apache.uima.cas.impl.FSIndexRepositoryImpl$PointerItera= tor.get(FSIndexRepositoryImpl.java:530)=0A>=A0 =A0 at org.apache.uima.cas.= impl.FSIteratorWrapper.get(FSIteratorWrapper.java:48)=0A>=A0 =A0 at org.ap= ache.uima.cas.impl.FSIteratorImplBase.next(FSIteratorImplBase.java:67)=0A>= =A0 =A0 at org.apache.uima.cas.impl.FSIteratorImplBase.next(FSIteratorImpl= Base.java:1)=0A>=A0 =A0 at com.norvar.uima.en_dic.annotator.EnDicAnnotator= .process(EnDicAnnotator.java:127)=0A>=A0 =A0 at org.apache.uima.analysis_c= omponent.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)=0A>= =A0 =A0 at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_im= pl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:377)=0A>= =A0 =A0 ... 6 more=0A> org.apache.uima.analysis_engine.AnalysisEngineProce= ssException: Annotator processing failed.=A0 =A0 =0A>=A0 =A0 at=0A org.apa= che.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComp= onentProcess(PrimitiveAnalysisEngine_impl.java:391)=0A>=A0 =A0 at org.apac= he.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputN= ewCASes(PrimitiveAnalysisEngine_impl.java:295)=0A>=A0 =A0 at org.apache.ui= ma.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBa= se.java:267)=0A>=A0 =A0 at org.apache.uima.analysis_engine.impl.AnalysisEn= gineImplBase.process(AnalysisEngineImplBase.java:280)=0A>=A0 =A0 at com.no= rvar.uima.test.utils.TestUtils.runAE(TestUtils.java:48)=0A>=A0 =A0 at com.= norvar.uima.en_places.test.EnPlacesTest.testPlacesAE(EnPlacesTest.java:41)= =0A>=A0 =A0 at com.norvar.uima.en_places.test.EnPlacesTest.main(EnPlacesTe= st.java:20)=0A> Caused by: java.util.ConcurrentModificationException=0A>=A0= =A0 at=0A org.apache.uima.cas.impl.FSIndexRepositoryImpl$PointerIterator.= checkConcurrentModification(FSIndexRepositoryImpl.java:246)=0A>=A0 =A0 at = org.apache.uima.cas.impl.FSIndexRepositoryImpl$PointerIterator.ll_get(FSInd= exRepositoryImpl.java:537)=0A>=A0 =A0 at org.apache.uima.cas.impl.FSIndexR= epositoryImpl$PointerIterator.get(FSIndexRepositoryImpl.java:530)=0A>=A0 = =A0 at org.apache.uima.cas.impl.FSIteratorWrapper.get(FSIteratorWrapper.ja= va:48)=0A>=A0 =A0 at org.apache.uima.cas.impl.FSIteratorImplBase.next(FSIt= eratorImplBase.java:67)=0A>=A0 =A0 at org.apache.uima.cas.impl.FSIteratorI= mplBase.next(FSIteratorImplBase.java:1)=0A>=A0 =A0 at com.norvar.uima.en_d= ic.annotator.EnDicAnnotator.process(EnDicAnnotator.java:127)=0A>=A0 =A0 at= org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnno= tator_ImplBase.java:48)=0A>=A0 =A0 at=0A org.apache.uima.analysis_engine.i= mpl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnal= ysisEngine_impl.java:377)=0A>=A0 =A0 ... 6 more ---280924705-77698155-1318892450=:92319--