Eclipse Madness – Why do fragment plugins work for some Developers and not others?

If you don’t do development work in Eclipse – stop reading this post now, come back tomorrow I promise that I will write about something else.

We’re writing our test plugins as fragments to be hosted inside the plugin they’re testing. Most of the time this works without a hitch and gives the benefit of being able to test classes and methods with package (default) visibility. We have several of these plugins that work with no problem both in my Eclipse IDE and our PDE builds. However for one developer one fragment plugin suffers the problem: Host bundle ‘xxx.xxx.xxx.common’ exists but is unresolved.

What does this mean? What is Eclipse saying? How on Earth do I debug this?

Fragment Manifest file:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Common Test
Bundle-SymbolicName: com.xxx.xxx.common.test
Bundle-Version: 0.1.0
Bundle-Vendor: XXXXX
Fragment-Host: com.xxx.xxx.common;bundle-version=”0.1.0″
Bundle-Localization: plugin
Require-Bundle: org.junit

Host Manifest file:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Common Plug-in
Bundle-SymbolicName: com.xxx.xxx.common
Bundle-Version: 0.1.0
Bundle-Activator: com.xxx.xxx.common.Activator
Bundle-Vendor: XXXXX
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime
Eclipse-LazyStart: true

BTW Clearly I’ve removed information that identifies the company and project – please trust that I’ve checked a hundred times over. The fragment manifest does refer to the correct host. In any case these same files work on my own and a third developers machine.

We’re using Eclipse 3.2 (and will for the next month or two). How do you debug these problems? Our source trees (and target platforms) are the same, I even tried diffing our workspaces but the binary nature of files means I found nothing useful. So what do you do when you encounter this sort of problem?

Be Sociable, Share!

Related posts:

  1. Developing Eclipse RCP apps? Want access to Display etc will running your Unit Tests
  2. Eclipse 0, YourKit 1
  3. Acceptance Testing and Eclipse Rich Client Applications – How to do it?
  4. GAC Madness
  5. Eclipse/GEF More questions than answers

Certified ScrumMaster TrainingIf you enjoyed this post take a look at Certified ScrumMaster Training. We currently have courses scheduled in Ottawa and Edmonton.


  • http://ianskerrett.wordpress.com Ian Skerrett

    Mark

    Not sure if you have asked this question on one of the newsgroups or the #eclipse IRC channel. Someone there might be able to help.

  • http://neilbartlett.name/blog/ Neil Bartlett

    Here’s one thing you can do. First launch your test runtime with the -console command: this will bring up the internal OSGi console. You might also have to specify -noExit to prevent Eclipse from shutting down when the testrunner application finishes.

    Once this is done, you should see an “osgi>” prompt. Type “ss” (short status) to get a list of bundles, and find your host bundle. Check the state – if it says “INSTALLED” then there was a problem resolving it, possibly due to missing dependencies. Try typing “diag N” where N is the bundle ID number that appears in the left hand column next to your host bundle. That should tell you everything you need to know about why the bundle was not resolved.

    If you have any questions, feel free to email me or login to #eclipse on IRC.

    Regards
    Neil

  • http://www.notesfromatooluser.com/ Mark Levison

    Thanks for the Reply Neil I will give a go early next week. Based on a comment in the Eclipse.Platform newsgroup I suspect that the problem lies with target workspace problems my developer was having at the time.

    I would think that these were orthogonal since the test plugin didn’t have any dependancies but I will just be happy if the problem solves itself.