SQLException: No suitable driver found for jdbc:jtds:sqlserver: after maven build
Answered
Hi. I trying to set up connection to mssql with AD account.
This code works in intelij:
String url ="jdbc:jtds:sqlserver://"+selected_server+";user="+user_name+";password="+user_password+domain+"";
conn = DriverManager.getConnection(url);
stmt = conn.createStatement();
stmt.executeQuery(query);
But after jar build with maven, I'm get SQLException: No suitable driver found for jdbc:jtds:sqlserver

maven build package with maven-assembly-plugin.
here is pom: https://pastebin.com/CprXdrYT
any suggestions?
Please sign in to leave a comment.
Hello,
Please check that driver jar is added into your application jar file.
Please check possible solution: https://stackoverflow.com/a/12298606/2960034