NoClassDefFound – but it’s _definitely_ there …
A collegue had a problem: the JUnit test failed. But not with a „normal“ error – it couldnt find a class. But the class was compiled in MyEclipse. So where is the difference between compile and test? It’s the run configuration. But … the jar containing the class was there. And I could find that jar on that path in the Explorer. I looked into the jar – maybe the class is not there … No – all was ok.
Oh no …. where to look now?
Back to the root. Just try running from the commandline. But it was the same.
After that we taylored the project: just one class referencing one class from that jar. Same problem.
So I gave up. We could send a bug report to Genuitec … but only with that jar. I found a workaround: referencing the other project.
No we found the problem: there was a blank in an attribute name of the manifest file. And this is according to „Name-Value pairs and Sections“ of the jar-specification not allowed. The jar was produced by Ant 1.6.2. There was no check for validity of the names …. yet😉Ant, en, Uncategorized