Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » P2 bundle info gets mangled if RCP or Eclipse install directory is renamed or moved
P2 bundle info gets mangled if RCP or Eclipse install directory is renamed or moved [message #1803535] Sun, 03 March 2019 12:00 Go to next message
Phil Beauvoir is currently offline Phil BeauvoirFriend
Messages: 49
Registered: October 2012
I'm trying to update our RCP application so that it uses P2 to install and uninstall packaged features and plugins (in a zip file). So far I've got the basic mechanism working but I have a problem that I need help with:

Moving or renaming the RCP app installation folder is a requirement, as the user may re-installs the app into a different location or simply want to move it to a different location.

However, if the user renames or moves the installation folder of the RCP application then the P2 information in the configuration area no longer matches the path to the installation folder and uninstalling or re-installing features/plugins leads to errors.

Our RCP *.ini file sets the configuration area on Windows as follows:


The RCP config.ini is as follows:


The following scenario is is where the problem accurs:

1. User installs the RCP app to C:\Archi
2. User installs a new feature using our P2 mechansism.
3. The following folders are then written to or updated in the @user.home/AppData/Roaming/Archi4/ folder:

  | org.eclipse.core.runtime
  | org.eclipse.e4.ui.css.swt.theme
  | org.eclipse.equinox.simpleconfigurator
  | org.eclipse.osgi
  | org.eclipse.update
  | .baseConfigIniTimestamp
  | config.ini
  | eclipse.ini.ignored
  | com.example.feature
  | org.eclipse.equinox.p2.core
  | org.eclipse.equinox.p2.engine
  | com.example.plugin

4. User moves the RCP app to C:\AnotherFolder
5. User now tries to uninstall the feature using P2 but the P2 ProfileChangeOperation Status is "Failed to find a configured bundleInfo for: [R]com.example.pluginname"
6. User now tries to re-install the feature using P2, Status is OK but now the app will not start. The *.log message written in .config folder contains errors such as

org.osgi.framework.BundleException: Could not resolve module: com.example.pluginname [1]
  Unresolved requirement: Require-Bundle:

How can I set things up so that this doesn't happen?

[Updated on: Wed, 06 March 2019 22:33]

Report message to a moderator

Tried on Eclipse [message #1803694 is a reply to message #1803535] Wed, 06 March 2019 22:15 Go to previous message
Phil Beauvoir is currently offline Phil BeauvoirFriend
Messages: 49
Registered: October 2012
So I tried using the "dropins" folder approach and ran across the same problem if the RCP installation folder is moved or renamed.

Then I wondered if Eclipse itself has problems with the "dropins" folder and renaming the Eclipse installation folder. Yes, it does if you follow these steps:

1. Install Eclipse into installation folder C:\Eclipse

2. Add the following lines to the "eclipse.ini" file so that the configuration and workspace locations are set to be different:


3. Add a plug-in to the "dropins" folder

4. Run Eclipse and check the plug-in is installed.

5. Quit Eclipse

6. Rename the installation folder to "C:\Eclipse2"

7. Run Eclipse. Plug-in is still installed.

8. Quit Eclipse

9. Delete the plug-in from the "dropins" folder

10. Run Eclipse. Plug-in is not installed.

11. Quit Eclipse

12. Put the plug-in back into the "dropins" folder

13. Run Eclipse. Plug-in is still installed.

12. Quit Eclipse

13. Run Eclipse again! Plug-in seems to be still installed but this time various error messages are logged to .log file

14. Quit Eclipse

15. Delete the plug-in from the "dropins" folder

16. Run Eclipse. This time Eclipse will not run! (Error messages are logged)

[Updated on: Wed, 06 March 2019 22:34]

Report message to a moderator

Previous Topic:Bundling JRE in a feature
Next Topic:Problems with P2 garbage collector
Goto Forum:

Current Time: Thu Sep 19 08:30:35 GMT 2019

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

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

Back to the top