Hi  Michael,

I had a similar error just trying to run cTAKES examples using windows
(with the D: I'm assuming you are using Windows). I made the following
changes.

I traced the error down to LvgCmdApiResourceImpl.java in the line lvg = new
LvgCmdApi("-f:l:b", configFileName);,.  The code for the configFileName is
applicable to UNIX, but unfortunately, IMHO, not for Windows.  So, I
changed it to -
configFileName = "/apache-ctakes-4.0.0Dev/ctake
s/ctakes-lvg-res/target/classes/org/apache/ctakes/lvg/data/config/lvg.properties";
and
lvg = new LvgCmdApi("-f:i:b", configFileName);  Note also the change to
-f:i:b
which worked to get lvg.properties. Note I'm running on the local machine.

After that fix a new set of multiple errors showed up of the form -
Exception: java.io.FileNotFoundException: C:\apache-ctakes-4.0.0Dev\ctak
es\ctakes-examples\data\misc\stopWords.data (The system cannot find the
path specified)
** Error: problem of opening/reading stop words file:
'C:\apache-ctakes-4.0.0Dev\ctakes\ctakes-examples\data/misc/stopWords.data'.

I fixed this by setting the LVG_DIR=/apache-ctakes-4.
0.0Dev/ctakes/ctakes-lvg-res/target/classes/org/apache/ctakes/lvg/ in
lvg.properties.

Let me know it this helps.

Don


On Wed, Mar 28, 2018 at 3:12 AM, Michael Trepanier <[email protected]>
wrote:

> Hi All,
>
> I am attempting to package cTAKES in a jar while while avoiding it copying
> the lvg related files to /tmp/ as it does in /ctakes/trunk/ctakes-lvg/
> src/main/java/org/apache/ctakes/lvg/ae/LvgAnnotator.java.
>
> Everything works up until cTAKES tries to path the lvg.properties file
> within the jar down to gov.nih.nlm.nls.lvg.Lib.SetConfiguration, where
> the code attempts to create a FileInputStream from a resource contained
> within a jar, which throws the below exception.
>
>
> ** Configuration Error: jar:file:\D:\ctakes\ctakes-
> local\lib\ctakes-assembly-4.0.jar!\org\apache\ctakes\lvg\data\config\lvg.properties
> (The filename, directory name, or volume label syntax is incorrect)
> ** Error: problem of opening/reading config file:
> 'jar:file:\D:\ctakes\ctakes-local\lib\ctakes-assembly-4.0.
> jar!\org\apache\ctakes\lvg\data\config\lvg.properties'. Use -x option to
> specify the config file path.
>
> While I likely can't avoid the above scenario without changing cTAKES'
> dependencies, I was wondering two things:
>
> 1) If it would be possible to set the LVG_DIR to a non absolute path
> instead of AUTO_MODE and have it function properly?
>
> 2) Oddly enough, despite logging this error, cTAKES appears to be running
> fine locally. Should I not be concerned about these configuration errors as
> they don't seem to be impacting anything? Is there a downstream way I can
> check that the properties file is being correctly read? Or is cTAKES
> chugging through the default pipeline evidence enough that I need not worry?
>
> Best,
>
> Mike
>
>
>
> --
> [image: MetiStream Logo - 500]
> Mike Trepanier| Big Data Engineer | MetiStream, Inc. |
> [email protected] | 845 - 270 - 3129 <(845)%20270-3129> (m) |
> www.metistream.com
>

Reply via email to