[jitsi-dev] Thought I would e-mail you on this issue related to Felix


#1

Hey

I run Jitsi in the browser as an applet. Recently, with enhanced security
restrictions, Java version 7u25 caused a warning to show up in the loading
process. Long story short, I nailed the issue down to this bit of code in
Felix ExtensionManager.java:

Felix.m_secureAction.addURLToURLClassLoader(Felix.m_secureAction.createURL(

                Felix.m_secureAction.createURL(null, "http:",
                extensionManager), "http://felix.extensions:9/",
                extensionManager), Felix.class.getClassLoader());
I recognized your name as being a developer on Jitsi when I came across

this

discussion forum https://issues.apache.org/jira/browse/FELIX-2780

Your suggestion of replacing http://felix.extensions:9 with
file://felix.extensions:9 <h://felix.extensions:9> is something I

discovered

to work as well, but I have no idea why Felix would be using this bizarre

URI

as a way to load libraries into the boot loaders class path.

Me neither, and I never got an easy explanation. Though I didn't follow it
either. The webstart launch of Jitsi was from a project at my former
university and is no longer maintained. We just used a patched version of
Felix back then.

I was wondering if you had any additional thoughts on this.

As you need to modify Jitsi anyway if you use it as an applet, just use the
patched Felix. I didn't notice any bad behavior and Jitsi only uses a small
subset of OSGi anyway.

Thanks.

Oren Forer
Engineer - Junction Networks

Ingo


#2

Hi Ingo,

For what it's worth.

I think this ExtensionManager is just implemented incorrectly. I think it wants to register itself as a stream protocol handler using the URI convention "http://felix.extensions:9", but there is no class "felix.extensions.http.Handler.class" associated to this URI convention. As a consequence, the URLHandlers.java (or URLStreamHandlerFactory ) class defaults to the only http implementation it knows of (sun.net.www.protocol) as listed in the following string inside the URLHandlers class.

  "private static final String DEFAULT_STREAM_HANDLER_PACKAGE =
      "sun.net.www.protocol|com.ibm.oti.net.www.protocol|gnu.java.net.protocol|wonka.net|com.acunia.wonka.net|org.apache.harmony.luni.internal.net.www.protocol|weblogic\utils|weblogic.net|javax.net.ssl|COM.newmonics.www.protocols";"

At the end of the day, I suspect that the recent security enhancements / policy won't allow classes to be loaded into the class loader over http. If felix.extensions was a valid package and included a Handler class this would probably not be an issue.

I found this link to be useful .

http://docs.oracle.com/javase/6/docs/api/java/net/URL.html#URL(java.lang.String, java.lang.String, int, java.lang.String)

Oren Forer
Engineer - Junction Networks

···

On Jun 20, 2013, at 4:01 PM, Ingo Bauersachs wrote:

Hey

I run Jitsi in the browser as an applet. Recently, with enhanced security
restrictions, Java version 7u25 caused a warning to show up in the loading
process. Long story short, I nailed the issue down to this bit of code in
Felix ExtensionManager.java:

Felix.m_secureAction.addURLToURLClassLoader(Felix.m_secureAction.createURL(

               Felix.m_secureAction.createURL(null, "http:",
               extensionManager), "http://felix.extensions:9/",
               extensionManager), Felix.class.getClassLoader());
I recognized your name as being a developer on Jitsi when I came across

this

discussion forum https://issues.apache.org/jira/browse/FELIX-2780

Your suggestion of replacing http://felix.extensions:9 with
file://felix.extensions:9 <h://felix.extensions:9> is something I

discovered

to work as well, but I have no idea why Felix would be using this bizarre

URI

as a way to load libraries into the boot loaders class path.

Me neither, and I never got an easy explanation. Though I didn't follow it
either. The webstart launch of Jitsi was from a project at my former
university and is no longer maintained. We just used a patched version of
Felix back then.

I was wondering if you had any additional thoughts on this.

As you need to modify Jitsi anyway if you use it as an applet, just use the
patched Felix. I didn't notice any bad behavior and Jitsi only uses a small
subset of OSGi anyway.

Thanks.

Oren Forer
Engineer - Junction Networks

Ingo