Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » osgi.framework.extensions does not work with WebStart
osgi.framework.extensions does not work with WebStart [message #1240490] Thu, 06 February 2014 15:40 Go to next message
Paweł Doleciński is currently offline Paweł DolecińskiFriend
Messages: 44
Registered: January 2014
Member
Hi,

I am trying to create WebStart for my Eclipse RCP application and need to add to osgi.framework.extensions addition Adaptor Hook from org.eclipse.fx.osgi and others.

I am doing like this in JNLP file:
<property name="osgi.framework.extensions" value="javax.transaction,org.eclipse.equinox.transforms.hook,org.eclipse.equinox.weaving.hook,org.eclipse.fx.osgi" />


Problem is that I am getting exception that bundle cannot be found.
After debugging I see that method readFrameworkExtensions() from org.eclipse.equinox.launcher.Main when looking for bundle is getting a path to jar file downloaded to local cache (e.g. C:\Users\pdolecinski\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\17\3bb97dd1-333be9ad). And later on, when trying to create extensionURL, it is using line code:
extensionURL = new URL(installLocation.getProtocol(), installLocation.getHost(), installLocation.getPort(), path);

where installLocation is http://localhost/webstart and created extensionURL looks like
http://localhost/webstart/C:\Users\pdolecinski\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\17\3bb97dd1-333be9ad

Even more, let's say path would be correct, then code expect to find file with .jar extension and the one from cache doesn't have it.

I have no idea if there is some workaround which I do not know or it simply a bug.

Any ideas how to add something to osgi.framework.extensions under WebStart?

Cheers,
Paweł.
Re: osgi.framework.extensions does not work with WebStart [message #1240592 is a reply to message #1240490] Thu, 06 February 2014 20:28 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
This looks like a bug in the equinox launcher. I don't see anyway around the bug. I think you could patch the launcher with something like this:

			URL extensionURL = null;
			File extensionFile = new File(path); // check if file exists
			if (extensionFile.exists()) { // the file exists just add it to the list of extensions
				extensionResults.add(path);
				extensionURL = extensionFile.toURL();
			} else
				extensionURL = new URL(installLocation.getProtocol(), installLocation.getHost(), installLocation.getPort(), path);


It would be good for you to try that out and also open a bug for this.
Re: osgi.framework.extensions does not work with WebStart [message #1241117 is a reply to message #1240592] Fri, 07 February 2014 14:07 Go to previous messageGo to next message
Paweł Doleciński is currently offline Paweł DolecińskiFriend
Messages: 44
Registered: January 2014
Member
Hi Thomas,

I opened a bug 427663.

Your patch works for me with few small adjustments described in the bug.

Thanks for help!
Re: osgi.framework.extensions does not work with WebStart [message #1695146 is a reply to message #1241117] Tue, 12 May 2015 09:43 Go to previous message
Loic Carney is currently offline Loic CarneyFriend
Messages: 2
Registered: May 2015
Junior Member
Hi,

It was a difficult path to end up and find this thread.
I have the exact same problem which is described. I have an RCP application which needs framework extensions (in my case : org.eclipse.fx.osgi).

Reading the bug 427663, i understand that the problem wasn't patched. I tried the snippet provided but still blocked.
Have you been working on that since ? Anyway i could get the code ?

Thanks
Previous Topic:Equinox, chose service implementation at runtime
Next Topic:Unable to load com.ibm.icu plugin on startup
Goto Forum:
  


Current Time: Thu Apr 25 12:26:17 GMT 2024

Powered by FUDForum. Page generated in 0.02991 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top