Today my JUnit Plugin tests decided to go on strike and throw ClassNotFoundException exceptions rather than run my master test suite. Although I was fairly confident in the small changes I had made couldn’t have ruined anything, I preferred confirmation from JUnit’s green bar.
After an hour of cursing, enabling all manner of debugging and tracing options on org.eclipse.osgi, and finally stepping through the classloader (not fun at all), I discovered that the test bundle’s BundleData had an empty classpath. Bingo! Adding the following single line to the MANIFEST.MF solved the issue:
Although I understand the necessity of this line, I’m at a loss to explain why my tests have been running perfectly well for the last several months.