You are looking at sqljdbc4.2 version like:
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
but, for sqljdbc4 version statement should be:
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
I think if you change your first version to write the correct Class.forName , your application will be running.
Interested in SQL ? Check out this SQL Certification by Intellipaat.
For more information visit :