Add sqlserver.jar
Here is link
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.
Another important point about this Exception is that, It is a checked Exception and you need to provide explicitly Exception handling while using methods which can possibly throw ClassNotFoundException
in java either by using try-catch block or by using throws clause.
public class ClassNotFoundException
extends ReflectiveOperationException
Thrown when an application tries to load in a class through its string name using:
but no definition for the class with the specified name could be found.