Name: dbT83986 Date: 04/08/99
Could NoClassDefFoundError contain some information
in it like [a] what class wasn't found and [b] the
"reason" (esp if out of file descriptors).
See the following 2 recent bug reports:
== update edit ==
more issues logged in the past with the NoClassDefFoundError label also :
== end update edit ==
It is kinda hard to debug things when you get a
"spurious" NoClassDefFoundError if the Error has no
information in it - for *years* I thought this was
just a "JIT bug" but now w/
thing makes sense.
So I suggest at the very least making the msg in the
Error contain the fully qualified class name and
the reason, where let's say the reason is "just not found"
or "out of fds".
There is a more general issue (philosophy) with all
the exceptions/errors/throwables in the JDK in that they
typically contain no information other than their class name.
In our s/w dev we put in a few bits of info to allow
problems to be diagnosed.
(Review ID: 56741)
Name: dbT83986 Date: 04/13/99
NoClassDefFoundError is used too loosely.
For instance, when you go to create a new instance of a class,
and the VM can not find one of the classes in it's search path,
it throws this error with the class that was not found as the
It is also used when you say Class.forName("AClass") when you
should have used Class.forName("some_package.AClass"). The
detailed message says (wrong name: some_package/AClass).
The latter problem is very different from the first problem,
but I can't tell the difference between them without parsing
the detailed message (which could probably change from one VM
implementation to another).
So, please provide more subclasses of NoClassDefFoundError.
While your at it, could you provide a method that returns the
class name that was not found? Again, that would keep me from
having to parse the detailed message for the answer that could
so easily be provided.
Thanks and keep up the outstanding work,