Hi Pei,

Thanks for the help!

I'm using version 3.0.1 of the resources and am grabbing my dependencies (using 
maven central) from ctakes-clinical-pipeline version 3.0.0-incubating. I wound 
up hosting versions of zoner,med-facts, and jcarafe myself; I found 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 dependencies manually.

I'm using: analysisEngine = 
AnalysisEngineFactory.createAnalysisEngineFromPath(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 tricks 
Eclipse uses here to transfer buildpath entries to the classpath during runtime 
(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 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.

-----Original Message-----



From: Pei Chen [mailto:chen...@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 <shook...@cra.com> 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.<init>(File.java:392)
>        at
> org.apache.ctakes.core.resource.FileResourceImpl.load(FileResourceImpl.java: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.
>
>
>
>

Reply via email to