Return-Path: X-Original-To: apmail-ctakes-dev-archive@www.apache.org Delivered-To: apmail-ctakes-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 92B6F10F94 for ; Tue, 10 Sep 2013 13:52:53 +0000 (UTC) Received: (qmail 34187 invoked by uid 500); 10 Sep 2013 13:52:53 -0000 Delivered-To: apmail-ctakes-dev-archive@ctakes.apache.org Received: (qmail 34073 invoked by uid 500); 10 Sep 2013 13:52:53 -0000 Mailing-List: contact dev-help@ctakes.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ctakes.apache.org Delivered-To: mailing list dev@ctakes.apache.org Received: (qmail 33770 invoked by uid 99); 10 Sep 2013 13:52:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Sep 2013 13:52:53 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of shookway@cra.com designates 209.117.122.227 as permitted sender) Received: from [209.117.122.227] (HELO mail.cra.com) (209.117.122.227) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Sep 2013 13:52:48 +0000 Received: from SERVER02.cra.lan ([fe80::a082:e839:501:9db7]) by SERVER02.cra.lan ([fe80::a082:e839:501:9db7%10]) with mapi; Tue, 10 Sep 2013 09:52:27 -0400 From: Steve Hookway To: "dev@ctakes.apache.org" Content-Class: urn:content-classes:message Date: Tue, 10 Sep 2013 09:52:25 -0400 Subject: RE: managing ctakes resources on classpath Thread-Topic: managing ctakes resources on classpath Thread-Index: Ac6uKmeEVTWXyD6CSRaO1lcIDMYiDgAAF3Kw Message-ID: <01E8078509D93B479FC58E620C913C7E02912274ED@SERVER02.cra.lan> References: <01E8078509D93B479FC58E620C913C7E02912274C4@SERVER02.cra.lan> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hi Pei, Thanks for the help! I'm using version 3.0.1 of the resources and am grabbing my dependencies (u= sing maven central) from ctakes-clinical-pipeline version 3.0.0-incubating.= I wound up hosting versions of zoner,med-facts, and jcarafe myself; I foun= d a ticket that made it seem like this is fixed in the latest release, but = I couldn't get the stuff from maven central working without adding these de= pendencies manually. I'm using: analysisEngine =3D AnalysisEngineFactory.createAnalysisEngineFro= mPath(analysisEnginePath); And the Path points to the ctakes-clinical-pipeline\\desc\\analysis_engine\= \AggregatePlaintextUMLSProcessor.xml It's interesting to me that when running from Eclipse adding the resources = to the buildpath vs. classpath makes a difference - I'm not sure what trick= s Eclipse uses here to transfer buildpath entries to the classpath during r= untime (that threats the resources differently).... Hopefully this is just a configuration problem! Thanks again for the help, Steve THIS MESSAGE IS INTENDED FOR THE USE OF THE PERSON TO WHOM IT IS ADDRESSED.= IT MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FRO= M DISCLOSURE UNDER APPLICABLE LAW. If you are not the intended recipient, y= our use of this message for any purpose is strictly prohibited. If you have= received this communication in error, please delete the message and notify= the sender so that we may correct our records. -----Original Message----- From: Pei Chen [mailto:chenpei@apache.org] Sent: Tuesday, September 10, 2013 9:34 AM To: dev@ctakes.apache.org Subject: Re: managing ctakes resources on classpath Hi Steve, The URI is not hierarchical is most likely caused by the code trying to use= the resources/models, but they are inside a jar instead of unpacked. -Which version of cTAKES are you using? -Do you happen to have the resource file name that caused the above? --Pei On Mon, Sep 9, 2013 at 9:48 PM, Steve Hookway wrote: > Hi all, > > I'm trying to integrate ctakes into a webapp and am running into > issues getting the resources to load correctly. In a standalone > version of the app, if I add the resources folder to the buildpath (as > described in the install directions) everything works as expected. > However, if I add the folder to the project classpath instead, I get a > URI is not hierarchical exception from FileResourceImpl.load: > > java.lang.IllegalArgumentException: URI is not hierarchical > at java.io.File.(File.java:392) > at > org.apache.ctakes.core.resource.FileResourceImpl.load(FileResourceImpl.ja= va:44) > at > org.apache.uima.resource.impl.ResourceManager_impl.registerResource(Re > sourceManager_impl.java:603) > > Similarly if I try and run from a webapp - setting up tomcat's > classpath to include the ctakes resource folder, I get the same URI is > not hierarchical error. I found this bug report: > https://issues.apache.org/jira/browse/CTAKES-89 but it suggests > adding the resource folder to my classpath, which isn't doing the trick. > > If you can steer me in the right direction, I'd really appreciate it. > > Thanks, > Steve > > > > > THIS MESSAGE IS INTENDED FOR THE USE OF THE PERSON TO WHOM IT IS > ADDRESSED. IT MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL > AND EXEMPT FROM DISCLOSURE UNDER APPLICABLE LAW. If you are not the > intended recipient, your use of this message for any purpose is strictly = prohibited. > If you have received this communication in error, please delete the > message and notify the sender so that we may correct our records. > > > >