uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kl├╝gl <pklu...@uni-wuerzburg.de>
Subject Re: Error using RUTA from Java
Date Wed, 20 May 2015 20:46:08 GMT
Hi,

I assume that you use UIMA Ruta 2.2.1?

Are there any prior exception?

I had a similar problem, which should be fixed now. Could be related to 
the bugs reported in UIMA-4045 or UIMA-4046.
Normally, I would assume that there is a syntax error in the additional 
script causing the module to be null. If the script file is not found, 
then there should be a clear error message.

Could you try the UIMA Ruta 2.3.0 RC2, but upgrading the dependency 
version of uima-core to 2.3.0 and using the staging repository?

<repositories>
         <repository>
           <id>staged-release</id>
<url>https://repository.apache.org/content/repositories/orgapacheuima-1053/</url>
         </repository>
       </repositories>

Best,

Peter

Am 20.05.2015 um 21:45 schrieb William Colen:
> Hello,
>
> We have a Main RUTA script that imports a few children scripts, as follows:
>
> PACKAGE cogroo.ruta;
>> TYPESYSTEM BaseTypeSystem;
>> IMPORT opennlp.uima.Token FROM TypeSystem AS cgToken;
>> IMPORT opennlp.uima.Sentence FROM TypeSystem AS cgSentence;
>> SCRIPT Crase;
>> SCRIPT Base;
>> Document{-> CALL(Base)};
>> Document{-> CALL(Crase)};
>
> All the scripts are in the root of the classpath.
>
> We are trying to call it from Java, using the following code:
>
> TypeSystemDescription tsd =
>> TypeSystemDescriptionFactory.createTypeSystemDescription("MainTypeSystem"
>> );
>> URL url = Resources.getResource("Main.ruta");
>> String scriptText = Resources.toString(url, Charsets.UTF_8);
>> AnalysisEngineDescription aeDes =
>> Ruta.createAnalysisEngineDescription(scriptText, tsd);
>> AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(aeDes);
>
>   The error we are getting:
>
> org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator
>> processing failed.
>> at
>> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:401)
>> at
>> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:309)
>> at
>> org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:267)
>> at org.cogroo.tools.checker.checkers.UIMAChecker.check(UIMAChecker.java:74)
>> at org.cogroo.tools.checker.checkers.UIMAChecker.check(UIMAChecker.java:1)
>> at
>> org.cogroo.tools.checker.TypedCheckerComposite.check(TypedCheckerComposite.java:49)
>> at org.cogroo.checker.GrammarChecker.analyze(GrammarChecker.java:252)
>> at org.cogroo.checker.GrammarChecker.analyze(GrammarChecker.java:271)
>> at org.cogroo.tools.checker.checkers.UIMAChecker.main(UIMAChecker.java:131)
>> Caused by: java.lang.NullPointerException
>> at
>> org.apache.uima.ruta.engine.RutaEngine.resetEnvironment(RutaEngine.java:529)
>> at
>> org.apache.uima.ruta.engine.RutaEngine.resetEnvironments(RutaEngine.java:524)
>> at org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:480)
>> at
>> org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
>> at
>> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:385)
>> ... 8 more
>
> We have a feeling that RUTA can't find the child script files, and that
> causes the error. Are we missing something?
>
>
> Thank you,
> William
>


Mime
View raw message