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😉

Explore posts in the same categories: Ant, en, Uncategorized

2 Kommentare - “NoClassDefFound – but it’s _definitely_ there …”

  1. Steve Loughran Says:

    well write the tests and go fix it🙂

  2. janmaterne Says:

    I have: rev 530374


Schreibe einen Kommentar

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s


%d Bloggern gefällt das: