java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
java, jdbc, sql
Solution
You need to add the jar file containing the class `com.microsoft.sqlserver.jdbc.SQLServerDriver` to your war file's `WEB-INF/lib` folder.
Problem
``` java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver ``` I got the above exception when i trying to deploying my Application into tomcat. but the weird thing is , i tried with a simple main method and it's works fine. Any help please ??? I did the following: ``` Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); String connectionUrl = "jdbc:microsoft:sqlserver://localhost:1433;" + "database=DBName;" + "user=UserName;" + "password=Password"; connection = DriverManager.getConnection(connectionUrl); ```