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ński
Messages: 43
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 Watson
Messages: 435
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 message
Paweł Doleciński is currently offline Paweł Doleciński
Messages: 43
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!
Previous Topic:where can I find and download the org\eclipse\osgi\framework\internal\core\BundleHost.java
Next Topic:Where do I place a Java 7 jre bundled with a Mac RCP app?
Goto Forum:
  


Current Time: Mon Oct 20 13:24:04 GMT 2014

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

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