A ClassNotFoundException occurs when the Java virtual machine (JVM) is unable to find a class that has been referenced in your code. This can happen for a number of reasons, including: