ctakes-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abramowitsch, Peter" <pabramowit...@hearst.com>
Subject Re: Annotator processing failed
Date Fri, 03 Feb 2017 16:54:52 GMT
I've had some experience pipelining ctakes behind a servlet (not the demo
servlet) and, without going deep into the code,  My feeling is that there
are no globally static data resources with instance level content.  It's
all just configuration and dictionaries.  Threading errors would only
occur if threads shared a CAS object. Or if one thread was trying to
modify the configuration that another thread was using.

If you're looking for high performance, I would keep a small pool of
instantiated CAS objects with their Annotators loaded.   Then as each
request comes in via a different thread, you grab a CAS off the pool, call
reset on it to clean out all the annotations and then run the annotation
process, output put the contents and hand it back to the pool.  Obviously
entrance and exit to the pool resources would have to be guarded by
semaphores or another thread safe mechanism.

- Peter 


On 2/2/17, 1:47 PM, "shahid ashraf" <shahid@trialx.com> wrote:

>Thanks sean..
>
>Seems it might have issue with thread safety of ctakes modules... mainly
>postagger. i too am guessing :P
>
>
>On Fri, Feb 3, 2017 at 2:46 AM, Finan, Sean <
>Sean.Finan@childrens.harvard.edu> wrote:
>
>> Hi Shahid,
>>
>>
>>
>> Just fyi, That client app is not part of ctakes or supported by the
>> general ctakes community.  My initial guess would be that it ran out of
>> memory or had an empty or unreadable document.  Again, this is a
>>complete
>> shot in the dark as I donĀ¹t use that servlet and the error report has
>> nothing specific with regard to ctakes.
>>
>>
>>
>> Sean
>>
>>
>>
>> *From:* shahid ashraf [mailto:shahid@trialx.com]
>> *Sent:* Thursday, February 02, 2017 8:37 AM
>> *To:* Finan, Sean; dev@ctakes.apache.org; Andrey Kurdumov;
>> masanz.james@gmail.com
>> *Subject:* Annotator processing failed
>>
>>
>>
>> I am using ctakes examples java servlet from here
>>https://urldefense.proofpoint.com/v2/url?u=http-3A__healthnlp.github&d=Dw
>>IFaQ&c=B73tqXN8Ec0ocRmZHMCntw&r=5LM1YwNyMUq7CWiSepCCsjTjwuVF4uswNF8BK5Orm
>>10&m=n62PXSo5vUbtPKgTOb6r9eHOKo1b0coTcSA0ZvIfOvc&s=yxBTEl4n0E2IfwyzT99vkS
>>KjRtANaj73OXm5RPPgVqw&e= .
>> io/examples/
>> 
>><https://urldefense.proofpoint.com/v2/url?u=http-3A__healthnlp.github.io_
>>examples_&d=DwMFaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67Gv
>>lGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=-pS4a8HsJtgy3fXJt8JmXdvd3X9gG3l5U
>>R-hkoRDG0A&s=qaWZ-ReKaj42RMRONEYR2tHoDSKM2KFJT9DyzNdzNi4&e=>
>>
>> After processing some documents maybe 1000+ it gets this error
>>
>> javax.servlet.ServletException:
>>org.apache.uima.analysis_engine.AnalysisEngineProcessException:
>>Annotator processing failed.
>>
>>         
>>org.apache.ctakes.web.client.servlet.DemoServlet.doPost(DemoServlet.java:
>>103)
>>
>>         javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
>>
>>         javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
>>
>>         
>>org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>
>> *root cause*
>>
>> org.apache.uima.analysis_engine.AnalysisEngineProcessException:
>>Annotator processing failed.
>>
>>         
>>org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAna
>>lysisComponentProcess(PrimitiveAnalysisEngine_impl.java:412)
>>
>>         
>>org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.process
>>AndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:314)
>>
>>         
>>org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.pr
>>ocessUntilNextOutputCas(ASB_impl.java:570)
>>
>>         
>>org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<i
>>nit>(ASB_impl.java:412)
>>
>>         
>>org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:3
>>44)
>>
>>         
>>org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.process
>>AndOutputNewCASes(AggregateAnalysisEngine_impl.java:265)
>>
>>         
>>org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.pr
>>ocessUntilNextOutputCas(ASB_impl.java:570)
>>
>>         
>>org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<i
>>nit>(ASB_impl.java:412)
>>
>>         
>>org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:3
>>44)
>>
>>         
>>org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.process
>>AndOutputNewCASes(AggregateAnalysisEngine_impl.java:265)
>>
>>         
>>org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(Analy
>>sisEngineImplBase.java:269)
>>
>>         
>>org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(Analy
>>sisEngineImplBase.java:284)
>>
>>         
>>org.apache.ctakes.web.client.servlet.DemoServlet.doPost(DemoServlet.java:
>>92)
>>
>>         javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
>>
>>         javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
>>
>>         
>>org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>
>> *root cause*
>>
>> java.lang.NullPointerException
>>
>>
>>
>> --
>>
>> with Regards
>>
>> Shahid Ashraf
>>
>
>
>
>-- 
>with Regards
>Shahid Ashraf


Mime
View raw message