ctakes-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Kurdumov <kant2...@googlemail.com>
Subject Re: Annotator processing failed
Date Sun, 05 Feb 2017 05:55:26 GMT
Sharid,
As far as I know Lvg at 2012 year or so fix issue which prevent it running
in multithreaded environment. That's one of the reasons why I update to
latest LVG.
BTW: Did you able to upgrade to LVG 2017 based on my comments, or you need
more direct steps ?

Thanks,
Andrey

3 Фев 2017 г. 23:19 пользователь "shahid ashraf" <shahid@trialx.com>
написал:

> Also this is the uima doc link which i implemented ... but did not work
>
> https://uima.apache.org/d/uimaj-current/tutorials_and_users_
> guides.html#ugr.tug.applications.multi_threaded
>
> On Fri, Feb 3, 2017 at 10:47 PM, shahid ashraf <shahid@trialx.com> wrote:
>
> > Thanks Peter
> >
> > I had implemented the JCAS pool from uima in the servlet as well , which
> > gives same error when servlet is accessed parallel, seems as there is
> some
> > resources which gets blocked ... which are used by  the annotators
> possibly
> > LVG/POSTAGGER. As servlet  threads try to access the same resources
> > /pipeline instantiated. the demo sevlet creates the pipleline /AE whilie
> > initializing.
> >
> > Here is the CAS pool thing which UIMA docs suggest for multi processing.
> >
> > pipeline = aggregateBuilder.createAggregate();
> >
> > jc = new JCasPool(5, pipeline);
> >
> > int s = jc.getSize();
> >
> >
> > doPost{
> >
> > JCas jcas = jc.getJCas(0);
> >
> > jcas.setDocumentText(text);
> >
> > pipeline.process(jcas);
> >
> > }
> >
> > Yes i also thing to create a object pool for AEs i.e instantiate multiple
> > AE pipeline objects in init servlet method ... dopost will use the object
> > from that pool. If you some code snippet, kindly share (newbie to ctakes
> > and java as well :))
> >
> > On Fri, Feb 3, 2017 at 10:24 PM, Abramowitsch, Peter <
> > pabramowitsch@hearst.com> wrote:
> >
> >> 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=5LM1YwNyMUq7CWiSepCCsjTjwu
> >> VF4uswNF8BK5Orm
> >> >>10&m=n62PXSo5vUbtPKgTOb6r9eHOKo1b0coTcSA0ZvIfOvc&s=yxBTEl4
> >> n0E2IfwyzT99vkS
> >> >>KjRtANaj73OXm5RPPgVqw&e= .
> >> >> io/examples/
> >> >>
> >> >><https://urldefense.proofpoint.com/v2/url?u=http-3A__
> >> healthnlp.github.io_
> >> >>examples_&d=DwMFaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCo
> >> ppxeFU&r=fs67Gv
> >> >>lGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=-pS4a8HsJtgy3fXJt8
> >> JmXdvd3X9gG3l5U
> >> >>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(WsFil
> ter.java:52)
> >> >>
> >> >> *root cause*
> >> >>
> >> >> org.apache.uima.analysis_engine.AnalysisEngineProcessException:
> >> >>Annotator processing failed.
> >> >>
> >> >>
> >> >>org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngi
> >> ne_impl.callAna
> >> >>lysisComponentProcess(PrimitiveAnalysisEngine_impl.java:412)
> >> >>
> >> >>
> >> >>org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngi
> >> ne_impl.process
> >> >>AndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:314)
> >> >>
> >> >>
> >> >>org.apache.uima.analysis_engine.asb.impl.ASB_impl$Aggregat
> >> eCasIterator.pr
> >> >>ocessUntilNextOutputCas(ASB_impl.java:570)
> >> >>
> >> >>
> >> >>org.apache.uima.analysis_engine.asb.impl.ASB_impl$Aggregat
> >> eCasIterator.<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.AggregateAnalysisEngi
> >> ne_impl.process
> >> >>AndOutputNewCASes(AggregateAnalysisEngine_impl.java:265)
> >> >>
> >> >>
> >> >>org.apache.uima.analysis_engine.asb.impl.ASB_impl$Aggregat
> >> eCasIterator.pr
> >> >>ocessUntilNextOutputCas(ASB_impl.java:570)
> >> >>
> >> >>
> >> >>org.apache.uima.analysis_engine.asb.impl.ASB_impl$Aggregat
> >> eCasIterator.<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.AggregateAnalysisEngi
> >> ne_impl.process
> >> >>AndOutputNewCASes(AggregateAnalysisEngine_impl.java:265)
> >> >>
> >> >>
> >> >>org.apache.uima.analysis_engine.impl.AnalysisEngineImplBas
> >> e.process(Analy
> >> >>sisEngineImplBase.java:269)
> >> >>
> >> >>
> >> >>org.apache.uima.analysis_engine.impl.AnalysisEngineImplBas
> >> e.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(WsFil
> ter.java:52)
> >> >>
> >> >> *root cause*
> >> >>
> >> >> java.lang.NullPointerException
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >>
> >> >> with Regards
> >> >>
> >> >> Shahid Ashraf
> >> >>
> >> >
> >> >
> >> >
> >> >--
> >> >with Regards
> >> >Shahid Ashraf
> >>
> >>
> >
> >
> > --
> > with Regards
> > Shahid Ashraf
> >
>
>
>
> --
> with Regards
> Shahid Ashraf
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message