An input CAS should not be released in the AE (user code). The Flow
Controller should be used
to prevent a CAS from flowing downstream. UIMA-AS will try to release a CAS
in a Final Step
of processing and this may cause an error like

"The system tried to return a common analysis structure to the pool from
which it was not checked out."

Jerry


On Mon, Nov 28, 2016 at 12:40 PM, nelson rivera <nelsonriver...@gmail.com>
wrote:

> I have deployed the aggregate of asynchronous way.
>  And i configure this aggregate to processing one request at the same
> time(numberOfCASes=1,default), because as i commented on previous
> email, in my flow: 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 i release the cas. I am
> assuming (numberOfCASes=1,default) that until all child has finished
> its processing, the aggregate not going processing other input cas of
> other request, it is correct?.
>
>
>
> 2016-11-28 12:00 GMT-05:00, Jaroslaw Cwiklik <uim...@gmail.com>:
> > Nelson, this error:
> >
> > "The system tried to return a common analysis structure to the pool from
> > which it was not checked out."
> >
> > I think this is caused if you try to release a CAS that has been
> previously
> > released. Sure you
> > are not trying to release it twice? I think releasing an input CAS in AE
> > code is not a good idea. I am assuming
> > you have an asynchronous aggregate (queue in front of each AE). In such
> > deployments, the UIMA-AS is
> > responsible for releasing a CAS once it reaches a Final state. Within a
> > synchronous aggregate I am not sure
> > if you are allowed to release a CAS in your code. Perhaps others can
> chime
> > in. Can you confirm which
> > deployment you chose for this aggregate (synch or asynch)
> > Jerry
> >
> > On Fri, Nov 25, 2016 at 11:14 AM, nelson rivera <
> nelsonriver...@gmail.com>
> > wrote:
> >
> >> The errores related are very random. I found a patron of error ( don't
> >> know if it's the only one): The caspool of the first casmultipler
> >> have size of 8, if i send a request to the aggregate in which the
> >> first casmultipler have to generate more than 8 child cas, i get
> >> random errors, the childs cas generated after the number 8, sometimes
> >> is empty, sometimes have less annotations than it should have (I see
> >> this with a own XCasSerializer annotator) or get nullPointerException.
> >> I don't know why can happen, because in the method "process()" of the
> >> second casmultipler i release the incoming cas (aJCas.release();)
> >> directly in my source code, for that the caspool of the first
> >> casmultipler will not empty. There is something taht i am not doing
> >> well?
> >>
> >> I don't have idea what may be going on?, i will appreciate the help
> >>
> >> 2016-11-24 19:24 GMT-05:00, nelson rivera <nelsonriver...@gmail.com>:
> >> > 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.PrimitiveAnalysisEngineControl
> >> ler_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>
> >> >>>
> >> >>
> >> >
> >>
> >
>

Reply via email to