uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kline, Larry D" <Larry.Kl...@USONCOLOGY.COM>
Subject ResourceManager_impl vs. ResourceManagerPearWrapper_impl
Date Tue, 06 Nov 2012 18:59:53 GMT
I use ConceptMapper to look up words in a dictionary.  The words are
first tokenized by an annotator called TokenizerAnnotator
(edu.mayo.bmi.uima.core.ae.TokenizerAnnotator).  The dictionary that
ConceptMapper uses is specified as a resource.  In order for the
matching to work correctly the dictionary must also be tokenized when it
is loaded using the same tokenizer.  That is a resource specification of
ConceptMapper.  So TokenizerAnnotator is used in two places (and
therefore loaded two time).

 

TokenizerAnnotator also has a resource, a list of frequencies for
hyphenated words.  The problem is this:

 

When the pear is installed, it attempts to load and instantiate all of
the analysis engines and their resources.  TokenizerAnnotator loads fine
when it is loaded as a component AE of its aggregate, and so does the
hyphenated words resources.  But when it is again loaded
TokenizerAnnotator as a resource of ConceptMapper, it fails.  It says it
cannot find the resource.

 

Looking at the stack I see that in the first case a
ResourceManagerPearWrapper_impl is used to start the loading, but in the
second case a ResourceManager_impl is used.  The failure occurs in the
method RelativePathResolver. resolveRelativePath().  In the first case
it has the paths to the desc and resources directories, but in the
second case it does not.  What I cannot understand is why in the second
case a ResourceManagerPearWrapper_impl is not being used.  I even tried
to create one explicitly and hand it off to the pear installer, but that
did not help.

 

I'm loading the pear from JBoss.  That's probably part of the problem.
I have lots of other resource loading problems that I've managed to work
around but this one I can't figure out.  BTW, all of this works
perfectly if I am not using the pear, that is, running from an eclipse
junit class or running in the CVD.

 

Here's the stack:

 

 
RelativePathResolver_impl.resolveRelativePath(URL) line: 122


 
DataResource_impl.initialize(ResourceSpecifier, Map<String,Object>)
line: 113               

 
SimpleResourceFactory.produceResource(Class<Resource>,
ResourceSpecifier, Map<String,Object>) line: 123   

 
CompositeResourceFactory_impl.produceResource(Class<Resource>,
ResourceSpecifier, Map<String,Object>) line: 62      

 
UIMAFramework.produceResource(Class<Resource>, ResourceSpecifier,
Map<String,Object>) line: 267               

 
UIMAFramework.produceResource(ResourceSpecifier, Map<String,Object>)
line: 241  

 
ResourceManager_impl.registerResource(String,
ExternalResourceDescription, String, Map<String,Object>) line: 565   

 
ResourceManager_impl.initializeExternalResources(ResourceManagerConfigur
ation, String, Map<String,Object>) line: 442   

 
PrimitiveAnalysisEngine_impl(Resource_ImplBase).initialize(ResourceSpeci
fier, Map<String,Object>) line: 146   

 
PrimitiveAnalysisEngine_impl(AnalysisEngineImplBase).initialize(Resource
Specifier, Map<String,Object>) line: 157   

 
PrimitiveAnalysisEngine_impl.initialize(ResourceSpecifier,
Map<String,Object>) line: 122         

 
AnalysisEngineFactory_impl.produceResource(Class<Resource>,
ResourceSpecifier, Map<String,Object>) line: 94      

 
CompositeResourceFactory_impl.produceResource(Class<Resource>,
ResourceSpecifier, Map<String,Object>) line: 62      

 
UIMAFramework.produceResource(Class<Resource>, ResourceSpecifier,
Map<String,Object>) line: 267               

 
UIMAFramework.produceAnalysisEngine(ResourceSpecifier,
Map<String,Object>) line: 361      

 
ASB_impl.setup(Map<String,ResourceSpecifier>, UimaContextAdmin,
FlowControllerDeclaration, AnalysisEngineMetaData) line: 254         

 
AggregateAnalysisEngine_impl.initASB(AnalysisEngineDescription,
Map<String,Object>) line: 431                

 
AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AnalysisE
ngineDescription, Map<String,Object>) line: 375   

 
AggregateAnalysisEngine_impl.initialize(ResourceSpecifier,
Map<String,Object>) line: 185       

 
AnalysisEngineFactory_impl.produceResource(Class<Resource>,
ResourceSpecifier, Map<String,Object>) line: 94      

 
CompositeResourceFactory_impl.produceResource(Class<Resource>,
ResourceSpecifier, Map<String,Object>) line: 62      

 
UIMAFramework.produceResource(Class<Resource>, ResourceSpecifier,
Map<String,Object>) line: 267               

 
UIMAFramework.produceAnalysisEngine(ResourceSpecifier) line: 335 

 
AnnotatorAdaptor.initCPM() line: 92     

 
DictionaryResource_impl$DictLoader.setDictionary(InputStream, int,
String, String, String, String, TokenFilter, TokenNormalizer, String)
line: 940                

 
DictionaryResource_impl.loadDictionaryContents(AnnotatorContext, Logger,
String, String, String, String) line: 263                

 
ConceptMapper.initialize(AnnotatorContext) line: 340 

 
AnnotatorAdapter.initialize(UimaContext) line: 109      

 
PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(Map<String,Obje
ct>) line: 249       

 
PrimitiveAnalysisEngine_impl.initialize(ResourceSpecifier,
Map<String,Object>) line: 155         

 
AnalysisEngineFactory_impl.produceResource(Class<Resource>,
ResourceSpecifier, Map<String,Object>) line: 94      

 
CompositeResourceFactory_impl.produceResource(Class<Resource>,
ResourceSpecifier, Map<String,Object>) line: 62      

 
UIMAFramework.produceResource(Class<Resource>, ResourceSpecifier,
Map<String,Object>) line: 267               

 
UIMAFramework.produceAnalysisEngine(ResourceSpecifier,
Map<String,Object>) line: 361      

 
ASB_impl.setup(Map<String,ResourceSpecifier>, UimaContextAdmin,
FlowControllerDeclaration, AnalysisEngineMetaData) line: 254         

 
AggregateAnalysisEngine_impl.initASB(AnalysisEngineDescription,
Map<String,Object>) line: 431                

 
AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AnalysisE
ngineDescription, Map<String,Object>) line: 375   

 
AggregateAnalysisEngine_impl.initialize(ResourceSpecifier,
Map<String,Object>) line: 185       

 
AnalysisEngineFactory_impl.produceResource(Class<Resource>,
ResourceSpecifier, Map<String,Object>) line: 94      

 
CompositeResourceFactory_impl.produceResource(Class<Resource>,
ResourceSpecifier, Map<String,Object>) line: 62      

 
UIMAFramework.produceResource(Class<Resource>, ResourceSpecifier,
Map<String,Object>) line: 267               

 
UIMAFramework.produceAnalysisEngine(ResourceSpecifier,
Map<String,Object>) line: 361      

 
ASB_impl.setup(Map<String,ResourceSpecifier>, UimaContextAdmin,
FlowControllerDeclaration, AnalysisEngineMetaData) line: 254         

 
AggregateAnalysisEngine_impl.initASB(AnalysisEngineDescription,
Map<String,Object>) line: 431                

 
AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AnalysisE
ngineDescription, Map<String,Object>) line: 375   

 
AggregateAnalysisEngine_impl.initialize(ResourceSpecifier,
Map<String,Object>) line: 185       

 
AnalysisEngineFactory_impl.produceResource(Class<Resource>,
ResourceSpecifier, Map<String,Object>) line: 94      

 
CompositeResourceFactory_impl.produceResource(Class<Resource>,
ResourceSpecifier, Map<String,Object>) line: 62      

 
UIMAFramework.produceResource(Class<Resource>, ResourceSpecifier,
Map<String,Object>) line: 267               

 
UIMAFramework.produceAnalysisEngine(ResourceSpecifier,
Map<String,Object>) line: 361      

 
ASB_impl.setup(Map<String,ResourceSpecifier>, UimaContextAdmin,
FlowControllerDeclaration, AnalysisEngineMetaData) line: 254         

 
AggregateAnalysisEngine_impl.initASB(AnalysisEngineDescription,
Map<String,Object>) line: 431                

 
AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AnalysisE
ngineDescription, Map<String,Object>) line: 375   

 
AggregateAnalysisEngine_impl.initialize(ResourceSpecifier,
Map<String,Object>) line: 185       

 
AnalysisEngineFactory_impl.produceResource(Class<Resource>,
ResourceSpecifier, Map<String,Object>) line: 94      

 
CompositeResourceFactory_impl.produceResource(Class<Resource>,
ResourceSpecifier, Map<String,Object>) line: 62      

 
UIMAFramework.produceResource(Class<Resource>, ResourceSpecifier,
Map<String,Object>) line: 267               

 
UIMAFramework.produceResource(Class<Resource>, ResourceSpecifier,
ResourceManager, Map<String,Object>) line: 312   

 
UIMAFramework.produceAnalysisEngine(ResourceSpecifier, ResourceManager,
Map<String,Object>) line: 392   

 
PearAnalysisEngineWrapper.initialize(ResourceSpecifier,
Map<String,Object>) line: 269            

 
SimpleResourceFactory.produceResource(Class<Resource>,
ResourceSpecifier, Map<String,Object>) line: 123   

 
CompositeResourceFactory_impl.produceResource(Class<Resource>,
ResourceSpecifier, Map<String,Object>) line: 62      

 
UIMAFramework.produceResource(Class<Resource>, ResourceSpecifier,
Map<String,Object>) line: 267               

 
UIMAFramework.produceResource(Class<Resource>, ResourceSpecifier,
ResourceManager, Map<String,Object>) line: 312   

 
UIMAFramework.produceAnalysisEngine(ResourceSpecifier, ResourceManager,
Map<String,Object>) line: 392   

 
RecognizerService.loadDescriptor(File) line: 108             

 
RecognizerService.<init>(File, File) line: 92        

 
RecognizerService.createInstance(File, File) line: 52      

 
RecognizerServletListener.contextInitialized(ServletContextEvent) line:
33      

 
StandardContext.contextListenerStart() line: 3392          

                                                StandardContext.start()
line: 3850           

 
WebDeploymentService.start(StartContext) line: 90      

 
ServiceControllerImpl$StartTask.startService(Service<? extends S>,
StartContext) line: 1811     

 
ServiceControllerImpl$StartTask.run() line: 1746             

 
ServiceContainerImpl$ContainerExecutor(ThreadPoolExecutor).runWorker(Thr
eadPoolExecutor$Worker) line: 1110       

 
ThreadPoolExecutor$Worker.run() line: 603       

 
ServiceContainerImpl$ServiceThread(Thread).run() line: 722    

 

Thanks,

Larry

</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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message