uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Klügl <peter.klu...@averbis.com>
Subject Re: UIMA Ruta thread safe
Date Tue, 06 Jun 2017 09:46:27 GMT

UIMA Ruta should be threadsafe.

Could it be that you create the CAS differently in your concurrent
setting? For example JCasFactory vs ae.newCAS()?

The exception indicates that Ruta cannot resolve the mention "Document"
correctly since it is an alias of uima.tcas.DocumentAnnotation and the
short name of the DKPro type. This exception should also occur in a
non-concurrent setting.

Anyways, this exception in this situation (using DKPro Core) is really
annoying. Did you try to activate strictImports?

If this does not help, do you have a minimal reproducible example?



Am 06.06.2017 um 11:03 schrieb Josep María Formentí Serra:
> Hi all,
>   We are building a web service using directly the RutaEngine, in the
> inicialization the engine is built as:
> UIMAFramework.produceAnalysisEngine(AnalysisEngineFactory
> .createEngineDescription(createEngineDescription(RutaEngine.class,
>                                             RutaEngine.PARAM_RULES,
> rule.getRule().getConditions()))));
>   And then we call method *process *passing the *JCas*.
>   All is ok but when we receive concurrent requests, starts to appears many
> exceptions like these:
> Caused by: java.lang.IllegalArgumentException: Document is ambiguous, use
> one of the following instead : uima.tcas.DocumentAnnotation
> de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Document
>     at
> org.apache.uima.ruta.RutaEnvironment.getType(RutaEnvironment.java:459)
> ~[ruta-core-2.6.0.jar:2.6.0]
> Caused by: java.lang.NullPointerException: null
>     at java.util.ArrayList.addAll(ArrayList.java:577) ~[na:1.8.0_66]
>     at
> org.apache.uima.ruta.condition.ImplicitCondition.eval(ImplicitCondition.java:70)
> ~[ruta-core-2.6.0.jar:2.6.0]
>   Is UIMA Ruta thread safe? we are doing something wrong?
> Thanks in advance,
>   JM

View raw message