I was creating a launch configuration for a plug-in test and wanted to have only a minimal set of plugins configured. Thus I am using PDE to add all required plug-ins of the test. The “Validate Plug-ins” action does not recognize any issue.

However, when starting the test it fails with a NullPointerException in ModelServiceImpl‘s constructor. The reason here is that no instance of IEventBroker was retrieved from the application context. To enhance the situation I have opened Bug#522051 and giving this as an error message.
To solve this issue when running on Equinox, the bundle org.eclipse.equinox.event has to be added to the launch configuration. Also configure this bundle to start automatically at start level 2.

I would have liked to give this hint already with the improved error message, but theoretically the IEventBroker could be also provided by another OSGi implementation, so this additional hint was rejected with reason. I hope that this post will help you then further.
Hi Karsten !
Thank you for your post. This is actually due to the fact that ‘Add Required Plugin’ can not manage the OSGi capabilities introduced in 4.6… The plugin org.eclipse.equinox.ds should also be added in the launch configuration.
There is a bug opened for that also : https://bugs.eclipse.org/bugs/show_bug.cgi?id=509436
See you at ECE 😉
Olivier
Hi Karsten,
I guess you are aware that you can take the list of bundles from a product definition as a blue print for what to add manually to your test launch config, right? E.g. what hitting the “Add Recommended” button gives you in this editor: http://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fguide%2Ftools%2Feditors%2Fproduct_editor%2Fconfiguration.htm
See you in 3 weeks.
I will try to improve the “Add Required Plugins” action. This is a hint for those who stumble over this error and need a solution. See ya!