uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xue-Feng Yang <just4l...@yahoo.com>
Subject Re: ConcurrentModificationException problems
Date Sat, 15 Oct 2011 20:21:42 GMT
Thanks Marshall. This is possible the reason.  I'll debug this later when I have time.



________________________________
From: Marshall Schor <msa@schor.com>
To: user@uima.apache.org
Sent: Saturday, October 15, 2011 1:09:17 AM
Subject: Re: ConcurrentModificationException problems

This error can happen when you are running an iterator over some index, and are
perhaps inside the loop are adding Feature Structures to that same index.

From the stack trace, I would suggest looking around line 127 in your
EnDicAnnotator, to see if you are perhaps adding a new FeatureStructure to the
indexes.

-Marshall


On 10/14/2011 7:09 PM, Xue-Feng Yang wrote:
> I have an annotator with a Set<String> variable which reads data in initialize(UimaContext)
from a file via parameter configuration in UimaContext. When debugging, it is OK at first
2 steps checks.contains(shingle) returned true. However, when called checks.contains(shingle)
at the 36th, it throws an exception 
>
>
> AnalysisEngineProcessException: Annotator processing failed
> Caused by: java.util.ConcurrentModificationException
> In my part of the code, after initialized, the variable is never modified and only the
method "contains" is called. I also tried to create the variable in
>
> Set<String> checks = Collections.synchronizedSet(new HashSet<String>());
>
>
> and not to test in JUnit, but the problem remains the same.
>
>
> After removing the code unit with "contains", it can go through.
>
> Any idea?
>
> Xue-Feng
>
> /////////////////////////////
>
> Oct 14, 2011 5:57:26 PM org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl
callAnalysisComponentProcess(405)
> SEVERE: Exception occurred
> org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator processing
failed.    
>     at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:391)
>     at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:295)
>     at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:267)
>     at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:280)
>     at com.norvar.uima.test.utils.TestUtils.runAE(TestUtils.java:48)
>     at com.norvar.uima.en_places.test.EnPlacesTest.testPlacesAE(EnPlacesTest.java:41)
>     at com.norvar.uima.en_places.test.EnPlacesTest.main(EnPlacesTest.java:20)
> Caused by: java.util.ConcurrentModificationException
>     at org.apache.uima.cas.impl.FSIndexRepositoryImpl$PointerIterator.checkConcurrentModification(FSIndexRepositoryImpl.java:246)
>     at org.apache.uima.cas.impl.FSIndexRepositoryImpl$PointerIterator.ll_get(FSIndexRepositoryImpl.java:537)
>     at org.apache.uima.cas.impl.FSIndexRepositoryImpl$PointerIterator.get(FSIndexRepositoryImpl.java:530)
>     at org.apache.uima.cas.impl.FSIteratorWrapper.get(FSIteratorWrapper.java:48)
>     at org.apache.uima.cas.impl.FSIteratorImplBase.next(FSIteratorImplBase.java:67)
>     at org.apache.uima.cas.impl.FSIteratorImplBase.next(FSIteratorImplBase.java:1)
>     at com.norvar.uima.en_dic.annotator.EnDicAnnotator.process(EnDicAnnotator.java:127)
>     at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
>     at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:377)
>     ... 6 more
> org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator processing
failed.    
>     at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:391)
>     at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:295)
>     at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:267)
>     at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:280)
>     at com.norvar.uima.test.utils.TestUtils.runAE(TestUtils.java:48)
>     at com.norvar.uima.en_places.test.EnPlacesTest.testPlacesAE(EnPlacesTest.java:41)
>     at com.norvar.uima.en_places.test.EnPlacesTest.main(EnPlacesTest.java:20)
> Caused by: java.util.ConcurrentModificationException
>     at org.apache.uima.cas.impl.FSIndexRepositoryImpl$PointerIterator.checkConcurrentModification(FSIndexRepositoryImpl.java:246)
>     at org.apache.uima.cas.impl.FSIndexRepositoryImpl$PointerIterator.ll_get(FSIndexRepositoryImpl.java:537)
>     at org.apache.uima.cas.impl.FSIndexRepositoryImpl$PointerIterator.get(FSIndexRepositoryImpl.java:530)
>     at org.apache.uima.cas.impl.FSIteratorWrapper.get(FSIteratorWrapper.java:48)
>     at org.apache.uima.cas.impl.FSIteratorImplBase.next(FSIteratorImplBase.java:67)
>     at org.apache.uima.cas.impl.FSIteratorImplBase.next(FSIteratorImplBase.java:1)
>     at com.norvar.uima.en_dic.annotator.EnDicAnnotator.process(EnDicAnnotator.java:127)
>     at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
>     at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:377)
>     ... 6 more
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message