You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Rice Yeh <ri...@gmail.com> on 2011/01/24 12:07:34 UTC

Resources under exported package cannot be found by bundle's classloader

Hi,
  I just find that resources under exported package cannot be found the
bundle's classloader. For example, I have the package a.b exported and there
is a text file f.txt under folder /a/b. I just find that the bundle's
classloader always return null when calling
classloader.getResource("a/b/f.txt"). For other non exported folder, there
is no such problem. Anyone meets similar problem?

Rice

Re: Resources under exported package cannot be found by bundle's classloader

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 1/24/11 6:07, Rice Yeh wrote:
> Hi,
>    I just find that resources under exported package cannot be found the
> bundle's classloader. For example, I have the package a.b exported and there
> is a text file f.txt under folder /a/b. I just find that the bundle's
> classloader always return null when calling
> classloader.getResource("a/b/f.txt"). For other non exported folder, there
> is no such problem. Anyone meets similar problem?

I'm guessing there's more to the scenario than meets the eye. The code 
for getting a resource is no different than the code for getting a 
class. Is it possible you are also importing this package and are wired 
to another bundle?

If you have a simple bundle that demonstrates the issue, please open a 
JIRA issue and attach the bundle and I'll look into it.

-> richard

> Rice
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org