Re: managing ctakes resources on classpath

2014-08-26 Thread Tim O'Connell
Hi Pei,

Yes, I was able to get as far as it looks like you did - until I ran into
the same error with ytex:
2014-08-25 22:43:09,596 WARN  org.apache.ctakes.ytex.umls.dao.UMLSDaoTest
 - sql exception - mrconso probably doesn't exist, check error

However, earlier in the ytex tests, I did get another error:
Running org.apache.ctakes.jdl.data.xml.ValidationTest
org.xml.sax.SAXParseException; schema_reference.4: Failed to read schema
document
'file:/C:/Users/oconnell/workspace/cTakes%20Projects/ctakes/ctakes-ytex/file:/C:/Users/oconnell/workspace/cTakes%2520Projects/ctakes/ctakes-ytex-res/target/ctakes-ytex-res-3.2.1-SNAPSHOT.jar!/org/apache/ctakes/jdl/xdl.xsd',
because 1) could not find the document; 2) the document could not be read;
3) the root element of the document is not xsd:schema.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
...
Caused by: java.io.FileNotFoundException:
C:\Users\oconnell\workspace\cTakes
Projects\ctakes\ctakes-ytex\file:\C:\Users\oconnell\workspace\cTakes%20Projects\ctakes\ctakes-ytex-res\target\ctakes-ytex-res-3.2.1-SNAPSHOT.jar!\org\apache\ctakes\jdl\xdl.xsd
(The filename, directory name, or volume label syntax is incorrect)
...
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.624 sec
 FAILURE!

It then goes on to keep running tests, and finds the ytex UMLS/SQL error
above, but at the end of that error dump, it says:
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.539 sec

Results :

Tests in error:
  setSchema(org.apache.ctakes.jdl.data.xml.ValidationTest)

Tests run: 36, Failures: 0, Errors: 1, Skipped: 4

Which seems to point towards the earlier test error as being what is
stopping the build.  Any thoughts?

Tim



On Mon, Aug 25, 2014 at 8:52 AM, Chen, Pei pei.c...@childrens.harvard.edu
wrote:

 Tim/Kim,
 After a quick debug, it looks like the DependencyParser Tests looks okay,
 however, the test pipeline uses LVG.  And during maven 'install', these
 files are inside a jar which LVG explicitly needs a File or Directory.  I
 just committed a step in the pom.xml to unpack the lvg-res.  This should be
 fine for the junit test; but also keep that in mind when configuring for a
 production environment.
 If you have a chance, could you try trunk?  It should solve the parser
 issue (and any other test components that depend on lvg-res), but not sure
 about potentially other test errors.

 --Pei

  -Original Message-
  From: Tim O'Connell [mailto:tim.oconn...@gmail.com]
  Sent: Monday, August 25, 2014 12:38 AM
  To: dev@ctakes.apache.org
  Subject: Re: managing ctakes resources on classpath
 
  Thanks Kim  Pei.  If it helps any, I'm getting the same error in
 Eclipse.
   I just checked out the code this morning from SVN.
 
  Using -DskipTests=true I was able to get it to build from the command
 line.
 
  Tim
 
 
 
 
  On Wed, Aug 20, 2014 at 12:41 PM, Kim Ebert
  kim.eb...@perfectsearchcorp.com
   wrote:
 
   I've added issue 307.
  
   https://issues.apache.org/jira/browse/CTAKES-307
  
   Kim Ebert
   1.801.669.7342
   Perfect Search Corp
   http://www.perfectsearchcorp.com/
  
   On 08/20/2014 11:52 AM, Chen, Pei wrote:
Thanks Kim- would you mind opening up a Jira to track this?
The cTAKES ClearNLP Dependency Parser and/or Test Cases most likely
need
   to be updated to enable resources to be picked up from the jar.
   
-Original Message-
From: Kim Ebert [mailto:kim.eb...@perfectsearchcorp.com]
Sent: Wednesday, August 20, 2014 1:39 PM
To: dev@ctakes.apache.org
Subject: Re: managing ctakes resources on classpath
   
I'm just using exactly what came out of SVN, so I haven't modified
the default classpath yet.
   
Kim Ebert
1.801.669.7342
Perfect Search Corp
http://www.perfectsearchcorp.com/
   
On 08/20/2014 11:28 AM, Chen, Pei wrote:
Do you happen to have both jars and unpacked in your cp?
Temp workaround: -DskipTests=true?
   
Sent from my iPhone
   
On Aug 20, 2014, at 1:25 PM, Kim Ebert
kim.eb...@perfectsearchcorp.com wrote:
I am encountering this same issue when I try to run mvn install
from the command line. Is there a way to get mvn install to work?
   
---
T E S T S
---
Running
org.apache.ctakes.dependency.parser.ae.util.TestClearNLPAnalysisE
ngin
es
log4j: reset attribute= false.
log4j: Threshold =null.
log4j: Level value for root is  [INFO].
log4j: root level set to INFO
log4j: Class name: [org.apache.log4j.ConsoleAppender]
log4j: Parsing layout of class: org.apache.log4j.PatternLayout
log4j: Setting property [conversionPattern] to [%d{dd MMM 
HH:mm:ss} %5p %c{1} - %m%n].
log4j: Adding appender named [consoleAppender] to category
  [root].
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time

Re: managing ctakes resources on classpath

2014-08-26 Thread Pei Chen
I'm not too privy to the ytex config details, but yes you're right,
it's caused by the xdl.xsd being null.  However it looks like it
exists in ytex-res.jar but the call being made uses Class.getResource
which won't be able to read in from the jar as an InputStream.
1) We can make ytex read in resources directly from jars (as maven
central artifacts).   We can make AppJdl.class.getResourceAsStream()
instead of getResource().  However, are there any other local physical
File dependencies?
2) Alternatively, we can add a step to have maven unpack res.jar if required.
I think 1 would be nice, but not sure how involved it will be.

Caused by: java.io.FileNotFoundException:
/Users/pei/workspace/apache-ctakes/trunk/ctakes-ytex/file:/Users/pei/workspace/apache-ctakes/trunk/ctakes-ytex-res/target/ctakes-ytex-res-3.2.1-SNAPSHOT.jar!/org/apache/ctakes/jdl/xdl.xsd
(No such file or directory)

at java.io.FileInputStream.open(Native Method)

at java.io.FileInputStream.lt;initgt;(FileInputStream.java:146)

at java.io.FileInputStream.lt;initgt;(FileInputStream.java:101)

  at 
sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)

Anyhow- https://issues.apache.org/jira/browse/CTAKES-308 opened to track this

On Tue, Aug 26, 2014 at 3:01 AM, vijay garla vnga...@gmail.com wrote:
 Hi

 The test that is failing has nothing to do with the MRCONSO not found
 warning.

 ValidationTest failed because it couldn't find the XSD.

 The XSD is in the ctakes-ytex-resources, but the corresponding maven
 artifact is an empty jar.

 I think it would be best to modify the resource jars to actually contain
 resources.


RE: managing ctakes resources on classpath

2014-08-25 Thread Chen, Pei
Tim/Kim,
After a quick debug, it looks like the DependencyParser Tests looks okay, 
however, the test pipeline uses LVG.  And during maven 'install', these files 
are inside a jar which LVG explicitly needs a File or Directory.  I just 
committed a step in the pom.xml to unpack the lvg-res.  This should be fine for 
the junit test; but also keep that in mind when configuring for a production 
environment.
If you have a chance, could you try trunk?  It should solve the parser issue 
(and any other test components that depend on lvg-res), but not sure about 
potentially other test errors.

--Pei

 -Original Message-
 From: Tim O'Connell [mailto:tim.oconn...@gmail.com]
 Sent: Monday, August 25, 2014 12:38 AM
 To: dev@ctakes.apache.org
 Subject: Re: managing ctakes resources on classpath
 
 Thanks Kim  Pei.  If it helps any, I'm getting the same error in Eclipse.
  I just checked out the code this morning from SVN.
 
 Using -DskipTests=true I was able to get it to build from the command line.
 
 Tim
 
 
 
 
 On Wed, Aug 20, 2014 at 12:41 PM, Kim Ebert
 kim.eb...@perfectsearchcorp.com
  wrote:
 
  I've added issue 307.
 
  https://issues.apache.org/jira/browse/CTAKES-307
 
  Kim Ebert
  1.801.669.7342
  Perfect Search Corp
  http://www.perfectsearchcorp.com/
 
  On 08/20/2014 11:52 AM, Chen, Pei wrote:
   Thanks Kim- would you mind opening up a Jira to track this?
   The cTAKES ClearNLP Dependency Parser and/or Test Cases most likely
   need
  to be updated to enable resources to be picked up from the jar.
  
   -Original Message-
   From: Kim Ebert [mailto:kim.eb...@perfectsearchcorp.com]
   Sent: Wednesday, August 20, 2014 1:39 PM
   To: dev@ctakes.apache.org
   Subject: Re: managing ctakes resources on classpath
  
   I'm just using exactly what came out of SVN, so I haven't modified
   the default classpath yet.
  
   Kim Ebert
   1.801.669.7342
   Perfect Search Corp
   http://www.perfectsearchcorp.com/
  
   On 08/20/2014 11:28 AM, Chen, Pei wrote:
   Do you happen to have both jars and unpacked in your cp?
   Temp workaround: -DskipTests=true?
  
   Sent from my iPhone
  
   On Aug 20, 2014, at 1:25 PM, Kim Ebert
   kim.eb...@perfectsearchcorp.com wrote:
   I am encountering this same issue when I try to run mvn install
   from the command line. Is there a way to get mvn install to work?
  
   ---
   T E S T S
   ---
   Running
   org.apache.ctakes.dependency.parser.ae.util.TestClearNLPAnalysisE
   ngin
   es
   log4j: reset attribute= false.
   log4j: Threshold =null.
   log4j: Level value for root is  [INFO].
   log4j: root level set to INFO
   log4j: Class name: [org.apache.log4j.ConsoleAppender]
   log4j: Parsing layout of class: org.apache.log4j.PatternLayout
   log4j: Setting property [conversionPattern] to [%d{dd MMM 
   HH:mm:ss} %5p %c{1} - %m%n].
   log4j: Adding appender named [consoleAppender] to category
 [root].
   Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:
   1.397 sec  FAILURE!
  
   Results :
  
   Tests in error:
  
  
   TestClearNLPPipeLine(org.apache.ctakes.dependency.parser.ae.util.Te
   stCle
   arNLPAnalysisEngines):
   URI is not hierarchical
  
   Kim Ebert
   1.801.669.7342
   Perfect Search Corp
   http://www.perfectsearchcorp.com/
  
   On 09/10/2013 07:33 AM, Pei Chen wrote:
   Hi Steve,
   The URI is not hierarchical is most likely caused by the code
   trying to use the resources/models, but they are inside a jar
   instead of
   unpacked.
   -Which version of cTAKES are you using?
   -Do you happen to have the resource file name that caused the
 above?
  
   --Pei
  
  
   On Mon, Sep 9, 2013 at 9:48 PM, Steve Hookway
   shook...@cra.com wrote:
   Hi all,
  
   I'm trying to integrate ctakes into a webapp and am running
   into issues getting the resources to load correctly. In a
   standalone version of the app, if I add the resources folder to
   the buildpath (as described in the install directions)
   everything works as expected. However, if I add the folder to
   the project classpath instead, I get a URI is not hierarchical
   exception from
   FileResourceImpl.load:
   java.lang.IllegalArgumentException: URI is not hierarchical
 at java.io.File.init(File.java:392)
 at
  
  
  org.apache.ctakes.core.resource.FileResourceImpl.load(FileResourceImpl
  .ja
   va:44)
 at
  
  
 org.apache.uima.resource.impl.ResourceManager_impl.registerResource
   (ResourceManager_impl.java:603)
  
   Similarly if I try and run from a webapp - setting up tomcat's
   classpath to include the ctakes resource folder, I get the same
   URI is not hierarchical error. I found this bug report:
   https://issues.apache.org/jira/browse/CTAKES-89 but  it
   suggests adding the resource folder to my classpath, which
   isn't doing the
  trick.
  
   If you can steer me in the right direction, I'd really
   appreciate

Re: managing ctakes resources on classpath

2014-08-24 Thread Tim O'Connell
Thanks Kim  Pei.  If it helps any, I'm getting the same error in Eclipse.
 I just checked out the code this morning from SVN.

Using -DskipTests=true I was able to get it to build from the command line.

Tim




On Wed, Aug 20, 2014 at 12:41 PM, Kim Ebert kim.eb...@perfectsearchcorp.com
 wrote:

 I've added issue 307.

 https://issues.apache.org/jira/browse/CTAKES-307

 Kim Ebert
 1.801.669.7342
 Perfect Search Corp
 http://www.perfectsearchcorp.com/

 On 08/20/2014 11:52 AM, Chen, Pei wrote:
  Thanks Kim- would you mind opening up a Jira to track this?
  The cTAKES ClearNLP Dependency Parser and/or Test Cases most likely need
 to be updated to enable resources to be picked up from the jar.
 
  -Original Message-
  From: Kim Ebert [mailto:kim.eb...@perfectsearchcorp.com]
  Sent: Wednesday, August 20, 2014 1:39 PM
  To: dev@ctakes.apache.org
  Subject: Re: managing ctakes resources on classpath
 
  I'm just using exactly what came out of SVN, so I haven't modified the
  default classpath yet.
 
  Kim Ebert
  1.801.669.7342
  Perfect Search Corp
  http://www.perfectsearchcorp.com/
 
  On 08/20/2014 11:28 AM, Chen, Pei wrote:
  Do you happen to have both jars and unpacked in your cp?
  Temp workaround: -DskipTests=true?
 
  Sent from my iPhone
 
  On Aug 20, 2014, at 1:25 PM, Kim Ebert
  kim.eb...@perfectsearchcorp.com wrote:
  I am encountering this same issue when I try to run mvn install from
  the command line. Is there a way to get mvn install to work?
 
  ---
  T E S T S
  ---
  Running
  org.apache.ctakes.dependency.parser.ae.util.TestClearNLPAnalysisEngin
  es
  log4j: reset attribute= false.
  log4j: Threshold =null.
  log4j: Level value for root is  [INFO].
  log4j: root level set to INFO
  log4j: Class name: [org.apache.log4j.ConsoleAppender]
  log4j: Parsing layout of class: org.apache.log4j.PatternLayout
  log4j: Setting property [conversionPattern] to [%d{dd MMM 
  HH:mm:ss} %5p %c{1} - %m%n].
  log4j: Adding appender named [consoleAppender] to category [root].
  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.397
  sec  FAILURE!
 
  Results :
 
  Tests in error:
 
 
  TestClearNLPPipeLine(org.apache.ctakes.dependency.parser.ae.util.TestCle
  arNLPAnalysisEngines):
  URI is not hierarchical
 
  Kim Ebert
  1.801.669.7342
  Perfect Search Corp
  http://www.perfectsearchcorp.com/
 
  On 09/10/2013 07:33 AM, Pei Chen wrote:
  Hi Steve,
  The URI is not hierarchical is most likely caused by the code trying
  to use the resources/models, but they are inside a jar instead of
  unpacked.
  -Which version of cTAKES are you using?
  -Do you happen to have the resource file name that caused the above?
 
  --Pei
 
 
  On Mon, Sep 9, 2013 at 9:48 PM, Steve Hookway
  shook...@cra.com wrote:
  Hi all,
 
  I'm trying to integrate ctakes into a webapp and am running into
  issues getting the resources to load correctly. In a standalone
  version of the app, if I add the resources folder to the buildpath
  (as described in the install directions) everything works as
  expected. However, if I add the folder to the project classpath
  instead, I get a URI is not hierarchical exception from
  FileResourceImpl.load:
  java.lang.IllegalArgumentException: URI is not hierarchical
at java.io.File.init(File.java:392)
at
 
 
 org.apache.ctakes.core.resource.FileResourceImpl.load(FileResourceImpl.ja
  va:44)
at
 
  org.apache.uima.resource.impl.ResourceManager_impl.registerResource
  (ResourceManager_impl.java:603)
 
  Similarly if I try and run from a webapp - setting up tomcat's
  classpath to include the ctakes resource folder, I get the same URI
  is not hierarchical error. I found this bug report:
  https://issues.apache.org/jira/browse/CTAKES-89 but  it suggests
  adding the resource folder to my classpath, which isn't doing the
 trick.
 
  If you can steer me in the right direction, I'd really appreciate
 it.
 
  Thanks,
  Steve
 
 
 
 
  THIS MESSAGE IS INTENDED FOR THE USE OF THE PERSON TO WHOM IT
  IS
  ADDRESSED. IT MAY CONTAIN INFORMATION THAT IS PRIVILEGED,
  CONFIDENTIAL AND EXEMPT FROM DISCLOSURE UNDER APPLICABLE
  LAW. If
  you are not the intended recipient, your use of this message for any
  purpose is strictly prohibited.
  If you have received this communication in error, please delete the
  message and notify the sender so that we may correct our records.
 




Re: managing ctakes resources on classpath

2014-08-20 Thread Kim Ebert
I've added issue 307.

https://issues.apache.org/jira/browse/CTAKES-307

Kim Ebert
1.801.669.7342
Perfect Search Corp
http://www.perfectsearchcorp.com/

On 08/20/2014 11:52 AM, Chen, Pei wrote:
 Thanks Kim- would you mind opening up a Jira to track this?
 The cTAKES ClearNLP Dependency Parser and/or Test Cases most likely need to 
 be updated to enable resources to be picked up from the jar.

 -Original Message-
 From: Kim Ebert [mailto:kim.eb...@perfectsearchcorp.com]
 Sent: Wednesday, August 20, 2014 1:39 PM
 To: dev@ctakes.apache.org
 Subject: Re: managing ctakes resources on classpath

 I'm just using exactly what came out of SVN, so I haven't modified the
 default classpath yet.

 Kim Ebert
 1.801.669.7342
 Perfect Search Corp
 http://www.perfectsearchcorp.com/

 On 08/20/2014 11:28 AM, Chen, Pei wrote:
 Do you happen to have both jars and unpacked in your cp?
 Temp workaround: -DskipTests=true?

 Sent from my iPhone

 On Aug 20, 2014, at 1:25 PM, Kim Ebert
 kim.eb...@perfectsearchcorp.com wrote:
 I am encountering this same issue when I try to run mvn install from
 the command line. Is there a way to get mvn install to work?

 ---
 T E S T S
 ---
 Running
 org.apache.ctakes.dependency.parser.ae.util.TestClearNLPAnalysisEngin
 es
 log4j: reset attribute= false.
 log4j: Threshold =null.
 log4j: Level value for root is  [INFO].
 log4j: root level set to INFO
 log4j: Class name: [org.apache.log4j.ConsoleAppender]
 log4j: Parsing layout of class: org.apache.log4j.PatternLayout
 log4j: Setting property [conversionPattern] to [%d{dd MMM 
 HH:mm:ss} %5p %c{1} - %m%n].
 log4j: Adding appender named [consoleAppender] to category [root].
 Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.397
 sec  FAILURE!

 Results :

 Tests in error:


 TestClearNLPPipeLine(org.apache.ctakes.dependency.parser.ae.util.TestCle
 arNLPAnalysisEngines):
 URI is not hierarchical

 Kim Ebert
 1.801.669.7342
 Perfect Search Corp
 http://www.perfectsearchcorp.com/

 On 09/10/2013 07:33 AM, Pei Chen wrote:
 Hi Steve,
 The URI is not hierarchical is most likely caused by the code trying
 to use the resources/models, but they are inside a jar instead of
 unpacked.
 -Which version of cTAKES are you using?
 -Do you happen to have the resource file name that caused the above?

 --Pei


 On Mon, Sep 9, 2013 at 9:48 PM, Steve Hookway
 shook...@cra.com wrote:
 Hi all,

 I'm trying to integrate ctakes into a webapp and am running into
 issues getting the resources to load correctly. In a standalone
 version of the app, if I add the resources folder to the buildpath
 (as described in the install directions) everything works as
 expected. However, if I add the folder to the project classpath
 instead, I get a URI is not hierarchical exception from
 FileResourceImpl.load:
 java.lang.IllegalArgumentException: URI is not hierarchical
   at java.io.File.init(File.java:392)
   at

 org.apache.ctakes.core.resource.FileResourceImpl.load(FileResourceImpl.ja
 va:44)
   at

 org.apache.uima.resource.impl.ResourceManager_impl.registerResource
 (ResourceManager_impl.java:603)

 Similarly if I try and run from a webapp - setting up tomcat's
 classpath to include the ctakes resource folder, I get the same URI
 is not hierarchical error. I found this bug report:
 https://issues.apache.org/jira/browse/CTAKES-89 but  it suggests
 adding the resource folder to my classpath, which isn't doing the trick.

 If you can steer me in the right direction, I'd really appreciate it.

 Thanks,
 Steve




 THIS MESSAGE IS INTENDED FOR THE USE OF THE PERSON TO WHOM IT
 IS
 ADDRESSED. IT MAY CONTAIN INFORMATION THAT IS PRIVILEGED,
 CONFIDENTIAL AND EXEMPT FROM DISCLOSURE UNDER APPLICABLE
 LAW. If
 you are not the intended recipient, your use of this message for any
 purpose is strictly prohibited.
 If you have received this communication in error, please delete the
 message and notify the sender so that we may correct our records.