I continued investigating and according to the stacktrace and source code of of FSIndexRepositoryImpl.ll_addFS_common() the exception is from line 2805 , in this part
final ArrayList<IndexIteratorCachePair<? extends FeatureStructure>> indexes = this.indexArray[typeCode]; // Add fsRef to all indexes. boolean noIndexOrOnlySetindexes = true; for (IndexIteratorCachePair<? extends FeatureStructure> iicp : indexes) {} //here apparently loop on a null value, any idea of why can happen this exception? 2016-11-24 16:27 GMT-05:00, nelson rivera <nelsonriver...@gmail.com>: > the error continue ocurring , this is the log, my casmultiplier is > FileSystemMultiplerCas > > 04:04:17.520 - 23: > cu.datys.xinetica.uima.core.FileSystemMultiplerCas.next(334): INFO: > Adicionando annotation tipo cu.datys.xinetica.uima.ContinueOnFailure > 04:04:17.522 - 23: org.apache.uima.util.CasPool.releaseCas: WARNING: > The system tried to return a common analysis structure to the pool > from which it was not checked out. > 04:04:17.523 - 23: > org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentNext(549): > SEVERE: Exception occurred > org.apache.uima.analysis_engine.AnalysisEngineProcessException > at > cu.datys.xinetica.uima.core.FileSystemMultiplerCas.next(FileSystemMultiplerCas.java:351) > at > org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentNext(PrimitiveAnalysisEngine_impl.java:526) > at > org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl$AnalysisComponentCasIterator.next(PrimitiveAnalysisEngine_impl.java:647) > at > org.apache.uima.aae.controller.PrimitiveAnalysisEngineController_impl.process(PrimitiveAnalysisEngineController_impl.java:860) > at > org.apache.uima.aae.handler.HandlerBase.invokeProcess(HandlerBase.java:121) > at > org.apache.uima.aae.handler.input.ProcessRequestHandler_impl.handleProcessRequestWithCASReference(ProcessRequestHandler_impl.java:795) > at > org.apache.uima.aae.handler.input.ProcessRequestHandler_impl.handle(ProcessRequestHandler_impl.java:1055) > at > org.apache.uima.aae.spi.transport.vm.UimaVmMessageListener.onMessage(UimaVmMessageListener.java:107) > at > org.apache.uima.aae.spi.transport.vm.UimaVmMessageDispatcher$1.run(UimaVmMessageDispatcher.java:70) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at > org.apache.uima.aae.UimaAsThreadFactory$1.run(UimaAsThreadFactory.java:132) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.NullPointerException > at > org.apache.uima.cas.impl.FSIndexRepositoryImpl.ll_addFS_common(FSIndexRepositoryImpl.java:2805) > at > org.apache.uima.cas.impl.FSIndexRepositoryImpl.ll_addFS(FSIndexRepositoryImpl.java:2763) > at > org.apache.uima.cas.impl.FSIndexRepositoryImpl.addFS(FSIndexRepositoryImpl.java:2068) > at > org.apache.uima.cas.impl.FSIndexRepositoryImpl.addFS(FSIndexRepositoryImpl.java:2674) > at org.apache.uima.cas.impl.CASImpl.addFsToIndexes(CASImpl.java:5023) > at org.apache.uima.jcas.impl.JCasImpl.addFsToIndexes(JCasImpl.java:1525) > at > cu.datys.xinetica.uima.core.FileSystemMultiplerCas.next(FileSystemMultiplerCas.java:337) > > > 2016-11-23 16:14 GMT-05:00, nelson rivera <nelsonriver...@gmail.com>: >> I have a aggregate service that contains in the flow in this order : 1 >> casmultiplier, then 2 primitive annotators and at the end other >> casmultiplier. >> The first casmultiplier receive a annotation with the path of a folder >> and creates a new child cas for each file in the folder, the child cas >> continue the flow in the other primitive annotators and at the end it >> go to the second casmultipler, in the second casmultipler can or not >> create new child cas, in the case of not, in the method process() i >> release de cas (aJCas.release();) directly in my source code. >> >> This aggregate service is deploys in uima-as and configure for >> processing only one request at the same time <casPool >> numberOfCASes="1"/>. For any reason, sometimes and of aleatorie way , >> making many requests to the service from many thread concurrent, in >> the first casmultiplier in method next() after get the new cas (JCas >> jcas = getEmptyJCas()) and while populate the cas , apparently some >> external component in another parallel thread modifys this obtained >> cas, and i get a NullPointerException adding a annotation >> (jcas.addFsToIndexes(copyOfFs);) in method next(). >> >> Any idea of what may be going on? >> >> this is the descriptor uima-as: >> >> >> <?xml version="1.0" encoding="UTF-8"?> >> <analysisEngineDeploymentDescription >> xmlns="http://uima.apache.org/resourceSpecifier"> >> >> <name>XPlagiarismCheckerAggregateAE Deploy Descriptor</name> >> <description>Deploys XPlagiarismCheckerAggregateAE</description> >> >> <deployment protocol="jms" provider="activemq"> >> <service> >> <inputQueue endpoint="XPlagiarismCheckerAggregate" >> brokerURL="${defaultBrokerURL}"/> >> <topDescriptor> >> <import location="./XPlagiarismCheckerAggregate.xml"/> >> </topDescriptor> >> <analysisEngine inputQueueScaleout="2" >> internalReplyQueueScaleout="3"> >> <delegates> >> <analysisEngine key="FileSystemMultiplerCas"> >> <casMultiplier poolSize="6"/> >> </analysisEngine> >> <analysisEngine key="XFileFormatDetector"> >> <scaleout numberOfInstances="2"/> >> <asyncAggregateErrorConfiguration> >> <processCasErrors maxRetries="0" >> continueOnRetryFailure="true"/> >> </asyncAggregateErrorConfiguration> >> </analysisEngine> >> <analysisEngine key="XDataFileExtractor"> >> <scaleout numberOfInstances="2"/> >> <asyncAggregateErrorConfiguration> >> <processCasErrors maxRetries="0" >> continueOnRetryFailure="true"/> >> </asyncAggregateErrorConfiguration> >> </analysisEngine> >> <analysisEngine key="XTokenizer"> >> <scaleout numberOfInstances="2"/> >> <asyncAggregateErrorConfiguration> >> <processCasErrors maxRetries="0" >> continueOnRetryFailure="true"/> >> </asyncAggregateErrorConfiguration> >> </analysisEngine> >> <analysisEngine key="MergerBasePairCasMultipler"> >> <casMultiplier poolSize="2"/> >> </analysisEngine> >> <analysisEngine key="XPlagiarismChecker"> >> <scaleout numberOfInstances="2"/> >> <asyncAggregateErrorConfiguration> >> <processCasErrors maxRetries="0" >> continueOnRetryFailure="true"/> >> </asyncAggregateErrorConfiguration> >> </analysisEngine> >> </delegates> >> </analysisEngine> >> </service> >> </deployment> >> </analysisEngineDeploymentDescription> >> >