uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kai Schlamp <schl...@gmx.de>
Subject Re: ResourceAccessException by using getResourceFilePath in Eclipse Plug-In
Date Sun, 25 Apr 2010 19:14:16 GMT
Tong Fin <tong.fin2@...> writes:

> Kai,
> Here is another hint to try:
> Do you try to print to the console the full file path of "resource".
> It is possible that Eclipse tries to find the file in the "current
> directory" that is at somewhere that you never expect it to be.

No, I don't try to print anything to the console. 
getContext().getResourceFilePath("resource") is enough to throw the exception.
I guess that it fails cause getResourceFilePath takes the classloader of the
below running Eclipse framework.
And that classloader only returns paths within
a bundle and not local file system paths. 
To get local file system paths one has to use the FileLocator in Eclipse, but
that would make the analysis engine
Eclipse dependent. 
Not sure if my guess is right as I am not an Eclipse expert.
But the result is that it makes it hard to write UIMA analysis engines as OSGi
bundles or Eclipse Plug-Ins that define resources the UIMA way.

Regards,
Kai





Mime
View raw message