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 48377188A9 for ; Fri, 11 Dec 2015 01:25:43 +0000 (UTC) Received: (qmail 48176 invoked by uid 500); 11 Dec 2015 01:25:43 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 48124 invoked by uid 500); 11 Dec 2015 01:25:43 -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 48112 invoked by uid 99); 11 Dec 2015 01:25:42 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Dec 2015 01:25:42 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 5578EC4A73 for ; Fri, 11 Dec 2015 01:25:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.129 X-Spam-Level: *** X-Spam-Status: No, score=3.129 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id wPzsPjL0B3IE for ; Fri, 11 Dec 2015 01:25:41 +0000 (UTC) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 9221620E9B for ; Fri, 11 Dec 2015 01:25:40 +0000 (UTC) Received: by mail-wm0-f45.google.com with SMTP id c201so57622538wme.0 for ; Thu, 10 Dec 2015 17:25:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=3hvmyZwweA+1cH73xRtTkidJ9JYn8VUuhKm9yZW+ibw=; b=OtF7qFTj/CvQpH/HzRWJmu5SPmr809cK+VXPUHkgD3FFp84pdMU+ipZ3P2ryn9CCSx y1RbNeDriW6/ht93NxIkZh5rPdyntE9VU9AsJjP1Q2anItFQZXiuBJZo4EetcAK6NsuC DwWno8NqVfU7oBsKMTED3tDo43nsb3EVNCtblLsaqL960+NO5MJKaDUN3CLeMSI1Abwd 7KVct6qPTde/TdRbv4cMZ0PKT222ljvk32Gq6CSLhqpYjhRglPmwq1y+lG71qOQGlrib qSAxvN+4dsVO+6IdY8Z07MkFX7R0byO4AnLqnQHvEWSQDPdMUSJvna1q0STvrljL4nGL jhIg== MIME-Version: 1.0 X-Received: by 10.28.95.193 with SMTP id t184mr2352492wmb.7.1449797140305; Thu, 10 Dec 2015 17:25:40 -0800 (PST) Received: by 10.27.12.80 with HTTP; Thu, 10 Dec 2015 17:25:40 -0800 (PST) In-Reply-To: <3005CB08-19EB-4F9A-8A97-31BB949352D8@apache.org> References: <3005CB08-19EB-4F9A-8A97-31BB949352D8@apache.org> Date: Thu, 10 Dec 2015 20:25:40 -0500 Message-ID: Subject: Re: uimaFIT auto-detection of types From: Matthew DeAngelis To: user@uima.apache.org Content-Type: multipart/alternative; boundary=001a114a48928b5beb05269533b7 --001a114a48928b5beb05269533b7 Content-Type: text/plain; charset=UTF-8 Hi Richard, Thanks for taking a look at my issue, I know I'm in good hands. The project is set up as in the UIMA tutorial, i.e. a Java project with an added UIMA Nature. I am using the jars for uimaFIT 2.1.0. Regards, Matt On Thu, Dec 10, 2015 at 6:24 PM, Richard Eckart de Castilho wrote: > 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: > > > > Hi all, > > > > 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. > > > > 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. > > > > CollectionReaderDescription cr = createReaderDescription(...); > > TypeSystemDescription tsd = > > TypeSystemDescriptionFactory.createTypeSystemDescription(); > > AnalysisEngineDescription djread = > > AnalysisEngineFactory.createEngineDescription(DJNMultiplier.class,tsd); > > SimplePipeline.runPipeline(cr,djread); > > > > 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." > > > > Changing the code to specify the location of the typesystem runs fine: > > > > CollectionReaderDescription cr = createReaderDescription(...); > > TypeSystemDescription tsd = > > > TypeSystemDescriptionFactory.createTypeSystemDescription("desc/types/DJTypes"); > > AnalysisEngineDescription djread = > > AnalysisEngineFactory.createEngineDescription(DJNMultiplier.class,tsd); > > SimplePipeline.runPipeline(cr,djread); > > > > 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.tools.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. > > > > Any help would be appreciated. I am probably missing something basic, but > > I'll be darned if I can see it. > > > > > > Regards, > > Matt > > --001a114a48928b5beb05269533b7--