incubator-ctakes-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kline, Larry D" <Larry.Kl...@USONCOLOGY.COM>
Subject RE: Can't find lookup dictionary from pear
Date Mon, 05 Nov 2012 19:28:30 GMT
Thanks.  That worked.

It seems that the pear file has the right stuff in it.  I install it in C:\Production\jboss-as-7.1.1.Final\standalone\tmp\work\jboss.web\default-host.
 This seems to be a JBoss related issue.  If I run the CVD from eclipse I don't have this
problem.  Even if I run the CVD against the pear file.

Does anyone have experience using UIMA with JBoss?

Thanks.

-----Original Message-----
From: Masanz, James J. [mailto:Masanz.James@mayo.edu] 
Sent: Friday, November 02, 2012 3:14 PM
To: 'ctakes-user@incubator.apache.org'
Subject: RE: Can't find lookup dictionary from pear

> but I don't know of a program that looks into pear files.  Do you?

As far as I can tell, pear files are just a type of zip file. 
When I rename a .pear file to be a .zip I can open it using 7-zip for example.

-- James


> -----Original Message-----
> From: ctakes-user-return-22-Masanz.James=mayo.edu@incubator.apache.org
> [mailto:ctakes-user-return-22-
> Masanz.James=mayo.edu@incubator.apache.org] On Behalf Of Kline, Larry 
> D
> Sent: Friday, November 02, 2012 3:19 PM
> To: ctakes-user@incubator.apache.org
> Subject: RE: Can't find lookup dictionary from pear
> 
> Actually I am using icTAKES 1.3.2, but the java class FileLocator is 
> exactly the same for both versions.  Of course something else could 
> have been added to 2.5 that avoids this issue.
> 
> When I build my pear there are two properties:
> 
> uima.datapath=$main_root/resources;$main_root/desc
> classpath= $main_root/war/WEB-
> INF/classes;$main_root/desc;$main_root/resources;$main_root/libs/dom4j
> -
> 1.6.1.jar;$main_root/libs/javassist-3.9.0.GA.jar;$main_root/libs/slf4j
> -
> api-1.4.3.jar;$main_root/libs/slf4j-log4j12-
> 1.4.3.jar;$main_root/libs/antlr-
> 2.7.6.jar;$main_root/libs/ojdbc6.jar;$main_root/libs/ant-
> junit.jar;$main_root/libs/ant.jar;
> 
> resources is the parent of drugnerresources and you can see above that 
> it is on the classpath and the uima.datapath.
> 
> I had assumed that this resource would be loaded in the same way as 
> other resources are loaded, but it appears that it is not.  For 
> instance, I also use medKAT, and dictionary resources (for
> ConceptMapper) are loaded using a ResourceManager, which is a UIMA 
> class which looks for resources in the pear (I assume).
> 
> I guess one solution is to put the resources folder in the war.  It's 
> not there now.
> 
> I assume resources in the pear, but I don't know of a program that 
> looks into pear files.  Do you?
> 
> Thanks for the suggestions.  They are useful.
> 
> Best regards,
> Larry
> 
> -----Original Message-----
> From: Chen, Pei [mailto:Pei.Chen@childrens.harvard.edu]
> Sent: Friday, November 02, 2012 11:42 AM
> To: ctakes-user@incubator.apache.org
> Subject: RE: Can't find lookup dictionary from pear
> 
> Hi Kline,
> I presume this is cTAKES version 2.5?
> Is the parent folder of "drugnerrrsources/lookup/g2_index" in the 
> classpath of your container (jboss?) ?
> My guess is that:
> 1) The resource is not in the classpath
> 2) The g2_index was lost during the creation of the pear and 
> eventually into the war? i.e. does the new g2_index folder really 
> exist in the target folder where the old classpath used to point?
> 
> Note: You can also try an file absolute path to verify that indeed 
> that is a classpath issue.
> 
> Hope that helps.
> Thanks,
> Pei
> 
> From: Kline, Larry D [mailto:Larry.Kline@USONCOLOGY.COM]
> Sent: Friday, November 02, 2012 2:30 PM
> To: ctakes-user@incubator.apache.org
> Subject: Can't find lookup dictionary from pear
> 
> I am using the cTAKES DictionaryLookup pipeline to find drug mentions 
> in documents.  When I run this from eclipse it works perfectly.  But 
> when I run from a pear file that I generated it fails.  It appears 
> that it cannot find the Lucene lookup dictionary folder that I 
> created.  This is the exception:
> 
>        ... 16 more
> Caused by: java.io.FileNotFoundException:
> drugnerresources/lookup/g2_index
>        at
> edu.mayo.bmi.uima.core.resource.FileLocator.locateExplicitly(FileLocat
> or
> .java:74) [classes:]
>        at
> edu.mayo.bmi.uima.core.resource.FileLocator.locateFile(FileLocator.java:
> 49) [classes:]
>        at
> edu.mayo.bmi.uima.core.resource.LuceneIndexReaderResourceImpl.load(Luc
> en
> eIndexReaderResourceImpl.java:61) [classes:]
>        ... 52 more
> 
> There's a large stack trace before this but this is the relevant part.  
> It gets to this code (locateExplicitly()) only if a class loader get 
> resource call fails.  That should probably have worked.
> 
> In my DictionaryLookupAnnotator I have this:
> 
>       <externalResource>
>         <name>RxnormIndex</name>
>         <description/>
>         <configurableDataResourceSpecifier>
>           <url/>
>           <resourceMetaData>
>             <name/>
>             <configurationParameters>
>               <configurationParameter>
>                 <name>UseMemoryIndex</name>
>                 <type>Boolean</type>
>                 <multiValued>false</multiValued>
>                 <mandatory>true</mandatory>
>               </configurationParameter>
>               <configurationParameter>
>                 <name>IndexDirectory</name>
>                 <type>String</type>
>                 <multiValued>false</multiValued>
>                 <mandatory>true</mandatory>
>               </configurationParameter>
>             </configurationParameters>
>             <configurationParameterSettings>
>               <nameValuePair>
>                 <name>UseMemoryIndex</name>
>                 <value>
>                   <boolean>true</boolean>
>                 </value>
>               </nameValuePair>
>               <nameValuePair>
>                 <name>IndexDirectory</name>
>                 <value>
>                   <string>drugnerresources/lookup/g2_index</string>
>                 </value>
>               </nameValuePair>
>             </configurationParameterSettings>
>           </resourceMetaData>
>         </configurableDataResourceSpecifier>
>         
> <implementationName>edu.mayo.bmi.uima.core.resource.LuceneIndexR
> eaderResourceImpl</implementationName>
>       </externalResource>
>     </externalResources>
> 
> You can see the definition of IndexDirectory is what it cannot find.  
> The location does exist at 
> <project_root>/resources/drugnerresources/lookup/g2_index.  I replaced 
> g2_index with rxnorm_index, which is something that came with the 
> cTAKES distribution and that does not work either.
> 
> When I build my pear file I include only the desc, resources, and 
> metadata folders from my project.  The pear goes into the war 
> directory and the war is deployed to a jboss 7.1 server.  I can see 
> the pear being unpacked when the war is deployed.  Without the drug 
> lookup all of this has worked perfectly for months.  But this is the 
> first time I am trying to use the cTAKES drug lookup.
> 
> Thanks,
> Larry Kline
> </pre>The contents of this electronic mail message and any attachments 
> are confidential, possibly privileged and intended for the 
> addressee(s) only.<br>Only the addressee(s) may read, disseminate, 
> retain or otherwise use this message. If received in error, please 
> immediately inform the sender and then delete this message without 
> disclosing its contents to anyone.</pre>

Mime
View raw message