Start here. This is the direct spoken answer to practice first.
Overview
The exception type narrows the failure, but the decisive evidence is which class definition and dependency version the running artifact actually loaded.
ClassNotFoundException usually means code explicitly asked a class loader for a named class and no definition was found. NoClassDefFoundError means the JVM expected a class during normal execution but could not define it, sometimes because an earlier static initialization failed. NoSuchMethodError means code was compiled against a method that the runtime version of the class does not provide. I preserve the first cause and inspect the exact class, method signature, and running artifact before changing dependencies.