ClassNotFoundException has bother me too much , now and often this error comes and I spent couple of hours blindely to find the error, enough. I just found this article on classnotfoundexception in java which tells some tips to deal with java.lang.ClassNotFoundException with example, atleast it eases my pain, here is what authros says:
Examples of classnotfoundexception in java
Though java.lang.classNotFoundException is very common and it can come for any classes, I usually see it while doing JDBC connectivity. I am going to list some of the most common scenario where you will get classnotfoundexception in java.
In this particular example of ClassNotFoundExcepiton in java, JVM failed to load “org.hibernate.hql.ast.hqltoken” class and it mostly comes while using hibernate to connect to database and some jar file is missing in classpath.