Eclipse RCP p2 self-update with Eclipse 3.6.x

If you are using the feature org.eclipse.equinox.p2.user.ui in your RCP product to include the p2 update mechanism in your application, or if you just use p2 internally, you might run into some issues with Eclipse 3.6.x. If your update is not working and or you get a log entry “the update checker service is not initialized”, then probably the OSGi bundle org.eclipse.equinox.ds is not started properly. The easiest way to solve this issue is to include org.eclipse.equinox.ds with start level 2 in your product configuration (in the configuration tab, see screenshot below)

Another thing is the newly introduced dependency of the bundle org.eclipse.equinox.p2.ui.sdk to org.eclipse.compare, which depends on org.eclipse.ui.ide… If you just want to use RCP self-updating, here is a recipe how to get rid of this dependency:

  • Import org.eclipse.equinox.p2.ui.sdk as source into your Eclipse IDE
  • Delete dependency to org.eclipse.compare
  • Delete class RevertProfilePageWithCompare
  • Export the bundle
  • Replace the original org.eclipse.equinox.p2.ui.sdk with the newly exported version in your target platform

I would like to thank Alexander (comment in my last post) for the pointer to a p2-dev mailing list entry.

With these 2 tips I got p2 self update for my MP3 Manager running again with Eclipse 3.6.x. I also got the headless PDE build running again and will blog about that later.

Have Fun!

Kai
Follow me on Twitter

This Post Has 4 Comments

  1. Ian Bull

    These were not introduced in 3.6.1, but rather, both these dependencies (the need for DS, and the UI’s need for compare) were introduced in 3.6.0. I’m surprised you’re only having these problems now.

  2. Kai Tödter

    @Ian,

    Thanks and yes, these changes were introduced with Helios but I since 3.6.1 is the current official release I refer to it. I edited the post to reduce confusion.

  3. pria

    Thanks a ton for posting this…very few sites for help with p2 update!!

Leave a Reply

I accept the Privacy Policy