ctakes-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Kincaid <kincaid.d...@gmail.com>
Subject Re: Asking help for always unsuccessful AE load
Date Wed, 03 Dec 2014 16:55:39 GMT
This problem is coming from the LvgAnnotator. The issue is with the
lvg.properties file. The annotation engine is trying to find its
lvg.properties file in the classpath. This file is part of the cTAKES
resources bundle, so should be installed under
$CTAKES_HOME/resources/org/apache/ctakes/lvg/data/config. Unfortunately
this file also exists inside the jar file ctakes-lvg-res-3.2.0.jar as well.
So if you have that jar file on your classpath and it comes before the
CTAKES_HOME/resources/... then you'll get this error. In my case the
ctakes-lvg-res-3.2.0.jar file was being pulled into my project by Maven.

My stack trace looked like this:

 java.lang.IllegalArgumentException: URI is not hierarchical
at java.io.File.<init>(File.java:418)
at
org.apache.ctakes.lvg.resource.LvgCmdApiResourceImpl.load(LvgCmdApiResourceImpl.java:65)

and the URI it was using for the file was:

jar:file:/home/davek/.m2/repository/org/apache/ctakes/ctakes-lvg-res/3.2.0/ctakes-lvg-res-3.2.0.jar!/org/apache/ctakes/lvg/data/config/lvg.properties

I fixed it by making sure that the cTAKES resources were in the classpath
before the dependent jar files (I use IntelliJ for development).

Hope that helps others when they search the archives since this issue seems
to come up quite a bit.

- Dave

On Tue, Dec 2, 2014 at 9:36 PM, Chen, Pei <Pei.Chen@childrens.harvard.edu>
wrote:

> Jun,
> Which version of cTAKES are you using. Also- how are you running ctakes-
> via the binary artifacts or from a dev env such as eclipse ide?
>
> Sent from my iPhone
>
> > On Dec 2, 2014, at 10:33 PM, Ying, Jun <JYING1@mgh.harvard.edu> wrote:
> >
> > Dear Sir/Madam,
> > When I Load some AE in cTakes like "SimulatedProdSmokingTAE.xml", It
> always jump the Exception "java.lang.illegalArgumentException: URl is not
> hierarchical". Why it happens? How to fix it.
> > Thanks.
> >
> > [X]
> >
> >
> > The information in this e-mail is intended only for the person to whom
> it is
> > addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> > contains patient information, please contact the Partners Compliance
> HelpLine at
> > http://www.partners.org/complianceline . If the e-mail was sent to you
> in error
> > but does not contain patient information, please contact the sender and
> properly
> > dispose of the e-mail.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message