ctakes-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Rogstadius <Jakob.Rogstad...@who-umc.org>
Subject Bug in resource import in LvgAnnotator?
Date Fri, 28 Aug 2015 08:26:57 GMT
Hi,

On line 579 in org.apache.ctakes.lvg.ae.LvgAnnotator there is the following resource import:
          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

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