0

I am writing an eclipse plugin with functionality distributed on some modules (core, util, ui etc). During implementing of new launch configuration (launch of course must call functionality from other bundles) for own project type I faced with the problem that this launch starts in new thread and a class that implements launch functionality don't see classes from other bundles and I have NoClassDefFaundError all the time.

I see that classes are loaded with different classloaders and this is OSGI specific behavior. I added necessary dependencies in MANIFEST files and eclipse shows me thats all ok and successfully build my plugins in workspace. But what happens wrong and why this doesn't work?

yu.pitomets
  • 1,660
  • 2
  • 17
  • 44

1 Answers1

1

The problem is due to weird OSGi behavior on classloaders. Eclipse must ensure to have all classes within a single bundle packaged with PDE. So usually restarting IDE environment and rebooting your PC helps. The MANIFEST referring to das schlecht java code has to inject the dependency on a mojo class to the bundle activator. When you have several plugins built with Ant via Eclipse PDE it is unlikely that GI / PD Equinox can resolve the misusage of those. Am i right..or maybe there is another option which is to analyzed further.