ClassNotFoundException and NoClassDefFoundError in java
ClassNotFoundException : ClassNotFoundException As the name suggests ClassNotFoundException in Java is a subclass of java.lang.Exception and Comes when Java Virtual Machine tries to load a particular class and doesn’t found the requested class in classpath. You need to add required jar in your classpath. NoClassDefFoundError : NoClassDefFoundError This is caused when there is a class file that your code depends on and it is present at compile time but not found at runtime. Look for differences in your build time and runtime classpaths.