What causes "noclassdeffounderror" in java?

Example:

This error indicates that the class definition the JVM found at runtime is not the same as the one it expected.

Solution:

Ensure your compile-time and runtime classpaths match and you're using consistent library versions.

Beginner's Guide to Java