To fix this issue The main error was that I used a version of the jdbc-api that was incompatible with the mssql-jdbc-6.1.0.jre8.jar driver. Changing to version 4.1 fixed it. The classNotFoundException was just a blunder on my part(forgot to update the pom.xml)
Java JDBC cannot connect to MSSQL Server
By : Bunty Pujari
Date : March 29 2020, 07:55 AM
it fixes the issue The Exception pretty much says it all - check your credentials (which you obviously have not given) with the database.