0

I have a rest API service deployed which has a method where it attempts to connect to SQL Server. Locally before deployment, this all worked fine but now I get the error that the Sqljdbc file is missing. Below is the exception

java web service java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver

Found many posts online here where suggestions to ensure library is in correct folder: src/main/webapp/WEB-INF/sqljdbc4.jar

WEB-INF/sqljdbc4.jar

I also added it to the folder /WEB-INF/lib/sqljdbc4.jar

Still I get the error. Any ideas or suggestions appreciated.

sTg
  • 4,313
  • 16
  • 68
  • 115
vbNewbie
  • 3,291
  • 15
  • 71
  • 155

1 Answers1

0

Have you checked if the system requirements of your server middleware are matching? Compare to this MS documentation: https://msdn.microsoft.com/en-us/library/ms378422%28v=sql.110%29.aspx

Do not forget to restart the server after adding the JAR.

fhissen
  • 347
  • 2
  • 7
  • So this is related to tomcat recognizing the driver and not the actual project? – vbNewbie Jul 16 '15 at 13:50
  • My guess is that it is either the wrong JRE version or the latter. Could there be a second sqljdbc*.jar in this tomcat installation? – fhissen Jul 16 '15 at 14:09