You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by "Chavan, Girish" <ch...@upmc.edu> on 2009/10/01 23:12:01 UTC

Eclipse RCP bundleresource urls returned for UimaContext.getResourceURL method

Hi All,

This is really an Eclipse RCP specific question. The problem is that when any of the TAEs use UIMAContext.getResourceURL method to get any of their resources, and the TAE is being run from within an Eclipse RCP application, the returned URLs are of the form bundleresource://188/path/to/your/resource

This is not understood by the remaining TAE code which is expecting a File:// URL.

This occurs because the Eclipse ClassLoader does this URL mangling before returning the correct URL.

The exact place where this call to the classloader takes place is in org.apache.uima.resource.RelativePathResolver.resolveRelativePath()

Has anybody faced this problem before and knows of a clean solution?

Based on my research I see two possible solutions:

1.       Explicitly set the classloader that is used by the  RelativePathResolver . By using our own classloader and not the Eclipse classloader we completely sidestep the problem.

2.       Modify the RelativePathResolver to undo the bundleresource URL coding and return a normal file:// url . This would require using a custom uima-core.jar which is not very attractive.

Any ideas/suggestions?


Thanks,
Girish Chavan, MSIS
Department of Biomedical Informatics (DBMI)
University of Pittsburgh
UPMC Cancer Pavilion, 302D
5150 Centre Avenue
Pittsburgh, PA  15232
Office: 412-623-4084
Email: chavang@upmc.edu