Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Eclipse RCP doesn't load bundles with same symbolic name, but different versions
Eclipse RCP doesn't load bundles with same symbolic name, but different versions [message #694365] Fri, 08 July 2011 12:28 Go to next message
xyz Mising name is currently offline xyz Mising name
Messages: 2
Registered: July 2011
Junior Member
Recently, I came across problem in newer version of Eclipse.
I created two bundles with same symbolic names (they aren't singletons), but different versions, and simple RCP application. When I start application as an RCP application, OSGi framework loads only one bundle (the other isn't loaded at all). When I start application using OSGi framework configuration, both bundles are loaded. Does this mean that I cannot have two bundles with same symbolic name, even though they have different versions?
This happened to me both in Helios and Indigo. Strangely, in Ganymede everything works fine.
Re: Eclipse RCP doesn't load bundles with same symbolic name, but different versions [message #698071 is a reply to message #694365] Mon, 18 July 2011 18:02 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

If they're not singletons, eclipse can have different versions of the same bundle active at the same time.

But what do you mean OSGi only loads one? Can you see them both in the OSGi console but only one is active? Is only one installed and active? What part of your RCP app is requesting both versions of the bundle load?

PW


Re: Eclipse RCP doesn't load bundles with same symbolic name, but different versions [message #1038961 is a reply to message #698071] Thu, 11 April 2013 14:54 Go to previous message
xyz Mising name is currently offline xyz Mising name
Messages: 2
Registered: July 2011
Junior Member
Sorry for answering so late.

In target platform I have two plugins: org.dep_1.0.1.jar and org.dep_2.0.0.jar (nothing fancy, no code beside Activator - basically the simple plugin project). Both jars have same symbolic name, the only difference is version number. They aren't singletons. Everything is done with Eclipse RCP 3.7.2.

I also created small test application with two workspace plugins:
org.test.main1 (only Activator) - depends on org.dep_2.0.0.jar
org.test.main (Sample RCP application with branding) - depends on org.dep_1.0.1.jar and org.test.main1 (which in turn depends on org.dep_2.0.0)

Now, there are two situations (OSGI console is active in both cases, and -noExit parameter is set):

1) Launch org.test.main RCP as an Eclipse application. Launching fails and "ss org.dep" in console says something like this
Framework is launched.

id State Bundle
8 <<LAZY>> org.dep_2.0.0

Sometimes org.dep_1.0.1 is loaded, but never both at the same time. If I try to install it later using OSGi console, it can be installed.

2) Create new OSGi Framework configuration, add required plugins and start it. Application doesn't start, but "ss org.dep" in console returns
Framework is launched.

id State Bundle
10 ACTIVE org.dep_1.0.1
22 ACTIVE org.dep_2.0.0

So both bundles are seen by OSGi.

I'm curious to find what is causing this, because I'd like to move from Eclipse 3.4.2 (where this doesn't happen), and I don't know if renaming bundles is the only way to go.
Also, setting resolver/wiring as tracing options doesn't say much about why it didn't recognize the second jar.

Thanks,
JB
Previous Topic:Can I Obtained perspective ID of a hidden view
Next Topic:java.security.PrivilegedActionException: two plugins
Goto Forum:
  


Current Time: Mon Sep 22 22:35:44 GMT 2014

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

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