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 59B3F184BA for ; Thu, 10 Dec 2015 23:24:58 +0000 (UTC) Received: (qmail 70939 invoked by uid 500); 10 Dec 2015 23:24:53 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 70894 invoked by uid 500); 10 Dec 2015 23:24:53 -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 70879 invoked by uid 99); 10 Dec 2015 23:24:52 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Dec 2015 23:24:52 +0000 Received: from [192.168.1.49] (201-26-87-52.dsl.telesp.net.br [201.26.87.52]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 3E8E41A0149; Thu, 10 Dec 2015 23:24:51 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: uimaFIT auto-detection of types From: Richard Eckart de Castilho In-Reply-To: Date: Thu, 10 Dec 2015 21:24:47 -0200 Content-Transfer-Encoding: quoted-printable Message-Id: <3005CB08-19EB-4F9A-8A97-31BB949352D8@apache.org> References: To: user@uima.apache.org X-Mailer: Apple Mail (2.3096.5) Hi Matt, are you using a Maven-base project/build (and the Maven project layout = with src/main/java, src/main/resources, etc.) or a plain Java project? Which version of uimaFIT are you using? Best, -- Richard > On 10.12.2015, at 12:16, Matthew DeAngelis wrote: >=20 > Hi all, >=20 > I am struggling with type auto-detection in Eclipse. Following the > documentation (and this document: > https://code.google.com/p/uimafit/wiki/TypeDescriptorDetection), I = have > placed my type system descriptors in desc/types/*.xml (also just > desc/*.xml) and created types.txt in META-INF/org.apache.uima.fit with = the > line classpath*:desc/types/*.xml (I have tried placing the types.txt = file > in the folder META-INF/org.uimafit as well, following Richard's = document > above, with the same results). However, I am still getting missing = type > complaints at runtime. >=20 > For instance, the following code runs a reader and a single analysis > engine, DJNMultiplier, that relies on the typesystem specified in > desc/types/DJTypes.xml. >=20 > CollectionReaderDescription cr =3D createReaderDescription(...); > TypeSystemDescription tsd =3D > TypeSystemDescriptionFactory.createTypeSystemDescription(); > AnalysisEngineDescription djread =3D > = AnalysisEngineFactory.createEngineDescription(DJNMultiplier.class,tsd); > SimplePipeline.runPipeline(cr,djread); >=20 > This results in: "org.apache.uima.cas.CASRuntimeException: JCas type > "document.DJInfo" used in Java code, but was not declared in the XML = type > descriptor." >=20 > Changing the code to specify the location of the typesystem runs fine: >=20 > CollectionReaderDescription cr =3D createReaderDescription(...); > TypeSystemDescription tsd =3D > = TypeSystemDescriptionFactory.createTypeSystemDescription("desc/types/DJTyp= es"); > AnalysisEngineDescription djread =3D > = AnalysisEngineFactory.createEngineDescription(DJNMultiplier.class,tsd); > SimplePipeline.runPipeline(cr,djread); >=20 > The latter code would actually be fine for most of my needs, except = that I > am trying to create a jar file following the instructions in the > documentation found here: > = https://uima.apache.org/d/uimafit-current/tools.uimafit.book.html#ugr.tool= s.uimafit.packaging. > These instructions seem predicated on typesystem auto-detection. When = I use > Maven Shade to build a jar from the latter code, it complains that: = "No > file with the name "desc/types/DJTypes.xml" was found in the class = path or > data path". I suppose that a solution to my problem could include a = way to > package up the typesystem descriptors so that they can be seen within = the > jar file; I'm not especially picky about getting this thing running. >=20 > Any help would be appreciated. I am probably missing something basic, = but > I'll be darned if I can see it. >=20 >=20 > Regards, > Matt