Return-Path: X-Original-To: apmail-uima-user-archive@www.apache.org Delivered-To: apmail-uima-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F140C173FC for ; Wed, 20 May 2015 20:47:20 +0000 (UTC) Received: (qmail 76679 invoked by uid 500); 20 May 2015 20:47:20 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 76635 invoked by uid 500); 20 May 2015 20:47:20 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 76624 invoked by uid 99); 20 May 2015 20:47:20 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 May 2015 20:47:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 0F8681828E3 for ; Wed, 20 May 2015 20:47:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.99 X-Spam-Level: X-Spam-Status: No, score=0.99 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id xVqojE6DyEp2 for ; Wed, 20 May 2015 20:47:18 +0000 (UTC) Received: from mailrelay.rz.uni-wuerzburg.de (wrz3035.rz.uni-wuerzburg.de [132.187.3.35]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id D50FB22F28 for ; Wed, 20 May 2015 20:47:17 +0000 (UTC) Received: from virusscan-slb.rz.uni-wuerzburg.de (localhost [127.0.0.1]) by mailrelay-slb.rz.uni-wuerzburg.de (Postfix) with ESMTP id E2FB78001F6 for ; Wed, 20 May 2015 22:46:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by virusscan-slb.rz.uni-wuerzburg.de (Postfix) with ESMTP id E1730183AB98 for ; Wed, 20 May 2015 22:46:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at uni-wuerzburg.de Received: from mailmaster.uni-wuerzburg.de ([127.0.0.1]) by localhost (vmail001.slb.uni-wuerzburg.de [127.0.0.1]) (amavisd-new, port 10225) with ESMTP id jUnF3CBeZo2M for ; Wed, 20 May 2015 22:46:09 +0200 (CEST) Received: from [192.168.0.5] (HSI-KBW-46-223-1-51.hsi.kabel-badenwuerttemberg.de [46.223.1.51]) by mailmaster.uni-wuerzburg.de (Postfix) with ESMTPSA id AB89A1284656 for ; Wed, 20 May 2015 22:46:09 +0200 (CEST) Message-ID: <555CF290.5010803@uni-wuerzburg.de> Date: Wed, 20 May 2015 22:46:08 +0200 From: =?UTF-8?B?UGV0ZXIgS2zDvGds?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: user@uima.apache.org Subject: Re: Error using RUTA from Java References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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? staged-release https://repository.apache.org/content/repositories/orgapacheuima-1053/ 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 >