ctakes-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pei Chen <chen...@apache.org>
Subject Re: Bug in resource import in LvgAnnotator?
Date Fri, 28 Aug 2015 21:31:46 GMT
Hi Jakob,
Yes, there is currently a limitation in the LVG component to have
their jar unpacked and added to the classpath.
I think there is an outstanding Jira to enable it read it from a jar
like the rest of the jars.  (There are some limitations such as
hsql/lucene not being able to read directly from a jar hence it's been

On Fri, Aug 28, 2015 at 4:26 AM, Jakob Rogstadius
<Jakob.Rogstadius@who-umc.org> wrote:
> Hi,
> On line 579 in org.apache.ctakes.lvg.ae.LvgAnnotator there is the following resource
>           ExternalResourceFactory.createExternalResourceDescription(
>               LvgCmdApiResourceImpl.class,
>               new File(LvgCmdApiResourceImpl.class.getResource(
>                   "/org/apache/ctakes/lvg/data/config/lvg.properties").toURI()))
>           );
> The .getResource() call breaks when the package is imported as a jar (from Maven central),
with an error stating that the "URI is not hierarchical". According to:
> http://stackoverflow.com/questions/18055189/why-my-uri-is-not-hierarchical
> the call should instead use .getResourceAsStream().
> Is this a bug, or am I doing something wrong? I'm not very familiar with how Java handles
resources in general.
> Jakob

View raw message