Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » RCP app can't see plug-ins installed in separate configuration area
icon5.gif  RCP app can't see plug-ins installed in separate configuration area [message #1062778] Mon, 10 June 2013 13:15 Go to next message
Klara Ward is currently offline Klara Ward
Messages: 9
Registered: July 2009
Junior Member
I have an RCP app (based on Eclipse 3.8.2)
which will be installed in c:\Program Files\..... by default on Windows.

So to be able to install plug-ins in my app, I need to set osgi.configuration.area to somewhere writable.

The problem is that when I install plug-ins, and restart my app, I can only see the newly installed features, but not the newly installed plug-ins, and the functionality they provide does not work..

I compared with an installation of Eclipse where I also installed my RCP app base plug-ins. Then I set osgi.configuration.area for Eclipse as well, and installed the same "extra" plug-ins that I install in my RCP app.
In this case, it worked fine, I can see the plug-ins, and they work as well.


Q:
What are the files that are most relevant to what plug-ins are actually loaded?
What Eclipse code do I debug?


I tried to compare the two config areas (RCP app and Eclipse), and the simpleconfigurator/bundles.info seems to differ quite a bit, for RCP app it's only two lines, for Eclipse it's the full set of installed plug-ins.



I've seen numerous questions in this area on forums, and also a number of Eclipse bugs, most of them seem closed. Non of the fixes/workarounds seem to work for me.

This is the config.ini I started out with:

eclipse.p2.profile=XYZ
osgi.splashPath=platform:/base/plugins/x.y.z.rcp.application
eclipse.application=x.y.z.rcp.application.app
eclipse.product=x.y.z.rcp.application.product
osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start,org.eclipse.equinox.simpleconfigurator@1:start,org.eclipse.equinox.ds@2:start,org.eclipse.equinox.util@2:start,org.eclipse.osgi.services@2:start,x.y.z.rcp.application@5
osgi.bundles.defaultStartLevel=4
osgi.instance.area.default=@user.home/.xyz/1.2.3


This is the config.ini after switching to using a bundles.info file and adapting some of the other things from the Eclipse config.ini:

eclipse.application=x.y.z.rcp.application.app
eclipse.p2.data.area=@config.dir/../p2
eclipse.p2.profile=XYZ
eclipse.product=x.y.z.rcp.application.product
equinox.use.ds=true
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
org.eclipse.update.reconcile=false
osgi.bundles.defaultStartLevel=4
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.301.v20120914-163612.jar@1\:start
osgi.configuration.area=D:/XYZs/conf_test/XYZ/conf
osgi.framework=file\:plugins/org.eclipse.osgi_3.8.2.v20130124-134944.jar
osgi.install.area.readOnly=true
osgi.instance.area.default=@user.home/.xyz/1.2.3
osgi.splashPath=platform:/base/plugins/x.y.z.rcp.application


Re: RCP app can't see plug-ins installed in separate configuration area [message #1063321 is a reply to message #1062778] Wed, 12 June 2013 20:20 Go to previous messageGo to next message
Pascal Rapicault is currently offline Pascal Rapicault
Messages: 290
Registered: July 2009
Location: Ottawa
Senior Member
When you are running Eclipse in c:\program files\, eclipse runs in "shared install mode" and as such an osgi.configuration.area is automatically created in the user home folder which is writtable.
In this mode, when plugins and features are installed, they are downloaded in the user home folder and the proper configuration files (bundles.info, config.ini) are also written there.
Before anything is installed, the config.ini should only contain one line and the bundles.info should not be present.

So a couple questions:
- do you explicitely set osgi.configuration.area, if so why?
- after the first run of your RCP app what are the files created in the configuration area?
- does your RCP app contain the org.eclipse.update.configurator bundle?

Pascal
Re: RCP app can't see plug-ins installed in separate configuration area [message #1063597 is a reply to message #1063321] Thu, 13 June 2013 09:24 Go to previous messageGo to next message
Klara Ward is currently offline Klara Ward
Messages: 9
Registered: July 2009
Junior Member
I started setting osgi.configuration.area explicitly when I was testing, because I did not realize there was a difference. Have now gone back to letting Eclipse create it in <userhome>/.eclipse
The RCP app does include the org.eclipse.update.configurator bundle.


We've discovered that the c:/users/klara/.eclipse/2020440166/configuration/org.eclipse.update/platform.xml file does not seem to be updated correctly when we install extra plug-ins,
it just contains the features of our base RCP app.

If we manually edit the file, and add this entry:
<site enabled="true" policy="USER-EXCLUDE" updateable="true" url="file:../../../Users/klara/.eclipse/2020440166/">
</site>

we can suddenly see and use our extra plug-ins.


---
Here's the list of the files in the configuration area, though I'm guessing the above platform.xml info should be a good enough clue to what the problem might be
(BTW, our app is obviously not "XYZ", but rather "JMC", alias Java Mission Control)


.:
configuration p2

./configuration:
org.eclipse.equinox.app org.eclipse.update org.eclipse.equinox.launcher org.eclipse.core.runtime org.eclipse.osgi

./configuration/org.eclipse.core.runtime:
.contributions.1 .extraData.1 .manager .orphans.1 .contributors.1 .mainData.1 .namespaces.1 .table.1

./configuration/org.eclipse.core.runtime/.manager:
.fileTable.7 .fileTable.8 .fileTableLock

./configuration/org.eclipse.equinox.app:
.manager

./configuration/org.eclipse.equinox.app/.manager:
.fileTableLock

./configuration/org.eclipse.equinox.launcher:
com.jrockit.mc.rcp.application_5.2.0.156934

./configuration/org.eclipse.equinox.launcher/com.jrockit.mc.rcp.application_5.2.
0.156934:
splash.bmp

./configuration/org.eclipse.osgi:
.bundledata.1 .lazy.1 .manager .state.1 bundles

./configuration/org.eclipse.osgi/.manager:
.fileTable.4 .fileTable.5 .fileTableLock

./configuration/org.eclipse.osgi/bundles: Icons and stuff
122/data/SCR/ 170/1/ 176/1/ 178/1/ 58/1/ 66/1/ 7/1/ 75/1/


./configuration/org.eclipse.update:
last.config.stamp platform.xml

./p2:
org.eclipse.equinox.p2.core org.eclipse.equinox.p2.engine

./p2/org.eclipse.equinox.p2.core:
cache

./p2/org.eclipse.equinox.p2.core/cache:
artifacts.xml

./p2/org.eclipse.equinox.p2.engine:
.settings profileRegistry

./p2/org.eclipse.equinox.p2.engine/.settings:
org.eclipse.equinox.p2.artifact.repository.prefs org.eclipse.equinox.p2.metadata.repository.prefs org.eclipse.equinox.p2.ui.sdk.scheduler.prefs












Re: RCP app can't see plug-ins installed in separate configuration area [message #1063875 is a reply to message #1063597] Fri, 14 June 2013 12:16 Go to previous messageGo to next message
Klara Ward is currently offline Klara Ward
Messages: 9
Registered: July 2009
Junior Member
So the question is why platform.xml is not written correctly.

Debugging both Eclipse and JMC, it looks like one difference is that during the Install phases, Eclipse performs 3 actions, but JMC is lacking the middle action "ParameterizedProvisioningAction",
it seems to be lacking because there are no "install" instructions in the IU touchpoint data. (I installed the same plug-in in both Eclipse and JMC).
It looks like the ParameterizedProvisioningAction might be what write the correct platform.xml

Any ideas on what else to look for?
Re: RCP app can't see plug-ins installed in separate configuration area [message #1064222 is a reply to message #1063875] Tue, 18 June 2013 06:29 Go to previous message
Markus Persson is currently offline Markus Persson
Messages: 1
Registered: July 2009
Junior Member
Pascal, thanks for the help. We (Klara and I) have now resolved this issue.

The reason was that we provided the wrong IU to the p2 Director. Instead of specifying the IU of the product itself, we had accidentally specified the IU of the containing feature.
Since this feature was the entire contents of the ".product", everything seemed to work anyway. (Due to being part of a larger install, the binary launcher was handled separately,
outside of the "eclipse" directory, and the config.ini inserted afterwards.)

But of course, what was missing was the CUs, in particular "tooling.osgi.bundle.default". (Since the update site in question was a pure add-on repository, p2 Publisher hadn't
added that CU in there either.)

In the non-shared install scenario, installing from the update site did "work" since we still have the legacy "org.eclipse.update.configurator" bundle (since the pre-p2 days),
which AFAIK simply adds any bundles it finds in the sites specified in platform.xml to the OSGi runtime. Am I correct in assuming that we could and should remove
"org.eclipse.update.configurator" from our product altogether?

For reference, our issue (and solution, I guess) was very similar to the one described in https://bugs.eclipse.org/bugs/show_bug.cgi?id=241559 .
Previous Topic:Select all available plugin and features
Next Topic:Add maven NAR files to Target Platform
Goto Forum:
  


Current Time: Fri Aug 22 13:54:50 EDT 2014

Powered by FUDForum. Page generated in 0.01704 seconds