The reason behind this error is that when there is a class file that your code depends on and it is present at compile time but not detected at runtime. Look for discrepancies in your build time and runtime classpaths.
Here are some possible solutions:
The class is not accessible in Java Classpath.
If you are operating in a J2EE environment than the clarity of Class among various Classloader can also produce java.lang.NoClassDefFoundError, see examples and synopses section for detailed discussion.
Review for java.lang.ExceptionInInitializerError in your log file. NoClassDefFoundError due to the breakdown of static initialization is very familiar.
Because NoClassDefFoundError is a subclass of java.lang.LinkageError can also occur if one of its yoke like a native library may not accessible.
Every start-up script is revoking the Classpath environment variable.
You might be working your program using jar command and class wasn't established in the evident file's ClassPath trait.