ctakes-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lewis John Mcgibbney <lewis.mcgibb...@gmail.com>
Subject URI is not hierarchical when attempting to obtain lvg.properties within JAR
Date Thu, 15 Oct 2015 05:55:11 GMT
Hi Folks,
I am using cTAKES 3.2.2 Maven dependencies.
I have some clinical pipeline code along with cTAKES dependencies and some
resources packaged into an uber jar which I am utilizing within my Spark
driver code. When I submit this to the Spark cluster I get a nasty stack
trace [0] with the following being important

- Caused by: java.lang.IllegalArgumentException: URI is not hierarchical
- 	at java.io.File.<init>(File.java:418)
- 	at org.apache.ctakes.lvg.ae.LvgAnnotator.createAnnotatorDescription(LvgAnnotator.java:565)
- 	at it.cnr.iac.CTAKESClinicalPipelineFactory.getTokenProcessingPipeline(CTAKESClinicalPipelineFactory.java:146)

The problem here is that
LvgAnnotator.createAnnotatorDescription(LvgAnnotator.java:565) looks as

              new File(LvgCmdApiResourceImpl.class.getResource(

Here we should be using LvgCmdApiResourceImpl.class.getResourceAsStream,
the transformation to File should then be done if required within

The above is an issue which has been reported on a few occasions and a fix
somewhat proposed for a similar issue here [1][2].
I am going to submit a patch for this and submit a test. I'll open an issue
in Jira.

[0] https://paste.apache.org/gDJa
[1] https://issues.apache.org/jira/browse/CTAKES-307
[2] https://issues.apache.org/jira/browse/CTAKES-89


View raw message