On Mon, Nov 30, 2009 at 6:23 AM, Chris Kiehl <cki...@atlassian.com> wrote:
> On 26/11/09 10:14 PM, Karl Pauls wrote:
>
>> Hm, on second thought we still have an issue when several versions of
>> felix are running inside the same jvm. I believe that with felix 2.0.2
>> or 1.2 we should do the right thing for the bundle: protocol (which is
>> what you need iirc) but we probably wont be able to find
>> URLStreamHandlerServices from the framework that was registered last.
>> I'm working on a patch which should fix this issue at least if the
>> next version of felix is started first.
>
> I am actually running into problems regarding what you mentioned while 
> instantiating URL objects when Felix 1.2 starts first:
>
> java.lang.ClassNotFoundException: 
> org.apache.felix.framework.URLHandlersServiceTracker
>        at 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
>        at 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
>        at 
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.getStreamHandlerService(URLHandlersStreamHandlerProxy.java:232)
>        at 
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:148)
>        at java.net.URL.<init>(URL.java:596)
>        at java.net.URL.<init>(URL.java:464)
>        at java.net.URL.<init>(URL.java:413)

I think this is only a System.out and shouldn't do any real harm.

> URLHandlersServiceTracker is a Felix 1.2 class but it's using the Felix 2.0 
> frameworks class loader to load the class, which fails because the class is 
> no longer in Felix 2.0. Is that one of the problems you were talking about? 
> Do you have an idea on how we would patch Felix 1.2 to resolve the issue?

Again, the reason for this is the problem I was talking about but
assuming it's just a System.out then it should only cause that you
can't find URLStreamHandlerServices inside the 2.0.2 framework which
shouldn't impact you.

> I wasn't able to test what happens if the Felix 2.0 framework starts first, 
> but from the looks of it it would fail as well because Felix doesn't have the 
> "getStreamHandlerService" method in the 1.2 framework.

Yup, it will be the other way around i.e., you will be able to see
URLStreamHandlerServices inside 2.0.2 but not inside 1.2. Again,
question is whether that matters for you. One way you could make the
1.2 first then 2.0.2 usecase work probably is to package the
o.a.f.URLHandlersServiceTracker from 1.2 with the 2.0.2 framework. The
other way around (i.e., 2.0.2 first then 1.2) will be more tricky but
I could implement something in trunk that makes it work (please open a
jira if you need that).

regards,

Karl

> Cheers,
> Chris
>
>



-- 
Karl Pauls
karlpa...@gmail.com

Reply via email to