Thrown if a JVM or ClassLoader instance tries to load the class definition (method call or create a new instance) and the class definition cannot be found.
The reason for NoClassDefFoundError is that a particular class is not available at run time, but available at compile time.
1. The class refers to a missing JAR file, or a JAVA or JAR has not been added to the class path.
2. The class is not available in the Java Classpath.
3. NoClassDefFoundError in Java due to an exception in the Static Initializer block . when your class performs static initialization in a static block, and if the static block throws an Exception, the class that is referencing this class will get a NoclassDefFoundError in Java.
4.Your Classpath, PATH or JAVA_HOME is not configured correctly or the JDK installation is incorrect. which can be solved by reinstalling the JDK .
5.Paste maven clean-install and just restart the server with the necessary Source (.java) files.
source share