Re: I'm annoyed



Lew wrote:
Oops - sorry about the null post.

Lew wrote:
NoClassDefFoundError is the standard response by the JVM when the
desired class, in this case AaaBbb, is not present at run time.

Mike Schilling wrote:
As documented, it's when a class referenced via normal Java
processing (e.g. running "new" on it) can't be found at run time.
Here my code was explicitly calling Classloader.loadClass();
...
I'm sure that the implementation is something like that. Still, it
wouldn't have been hard for loadClass() to catch the Error and
throw
an Exception; that's the fix I put in. And it would result in the
bloody method behaving as documented.

The documentation says that NoClassDefFoundError is "[t]hrown if the
Java Virtual Machine or a ClassLoader instance tries to load in the
definition of a class (as part of a normal method call or as part of
creating a new instance using the new expression) and no definition
of the class could be found."
You performed a normal method call, 'loadClass()'. My analysis was
that the error occurred on the attempt to load the class, completely
consistent with the documentation that it occurs when the JVM or
"ClassLoader instance tries to load in the definition". This
happened at run time. The action was entirely consistent with the
documentation.

Excpet that it didn't happen "as part of a normal method call or as
part of creating a new instance using the new expression"


.



Relevant Pages

  • Re: Im annoyed
    ... You performed a normal method call, ... My analysis was that the error occurred on the attempt to load the class, completely consistent with the documentation that it occurs when the JVM or "ClassLoader instance tries to load in the definition". ...
    (comp.lang.java.programmer)
  • Re: connecting to mysql using jsp
    ... Thrown if the Java Virtual Machine or a ClassLoader instance tries ... to load in the definition of a class (as part of a normal method ... This means that the Tomcat JVM cannot find the class file for the class org.aspectj.lang.Signature. ... Check that the AspectJ JAR file is in a location where the Tomcat JVM can find it. ...
    (comp.lang.java.databases)
  • Re: Im annoyed
    ... consistent with the documentation that it occurs when the JVM or ... "ClassLoader instance tries to load in the definition". ... The action was entirely consistent with the ...
    (comp.lang.java.programmer)
  • Re: Im annoyed
    ... consistent with the documentation that it occurs when the JVM or ... "ClassLoader instance tries to load in the definition". ...  The action was entirely consistent with the ...
    (comp.lang.java.programmer)