Eclipse RCP doesn't load bundles with same symbolic name, but different versions [message #694365] |
Fri, 08 July 2011 08:28  |
Eclipse User |
|
|
|
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 #1038961 is a reply to message #698071] |
Thu, 11 April 2013 10:54  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03728 seconds