Database connector: java.sql.SQLException: No suitable driver. Is this an error with my jdbc driver jar file? If so, how do I correctly install this?

Edit: Since the module pre-installs jdbc drivers, it seems the problem could be that I’m using the server name instead of the host name in my jdbc string. Unless my version of microsoft sql needs an older driver (I am on version 18 of microsoft sql server). Since my sql server is on a remote computer, I’m not able to use a terminal to get the host name. However, I do have the server name. Is there some way I can get the host name from the server name?   I’m getting these errors:   Caused by: java.sql.SQLException: No suitable driver    Failed to get driver instance for jdbcUrl=jdbc:microsoft:sqlserver://<server name>:<port>;databaseName=<database>   I followed the documentation at Database | Mendix Documentation and installed the jdbc driver from the link from the mendix documentation: Download Microsoft JDBC Driver 6.0 for SQL Server from Official Microsoft Download Center . I then copied the sqljdbc42.jar file into the userlib directory of my Mendix application. I tried the same with the sqljdbc41.jar file.   Do these errors indicate a problem with my installation of the jdbc driver? If so, how should I do this differently?
3 answers

One way to be sure is that open ur project in Eclipse and write a peice of code to connect to DB using tha same JDBC url.see if you are successful.

If it works here it will work in mendix too AFAIK.






The database connector also already comes with a bunch of drivers included with the module, did you check the lib that you didnt put double drivers for the Microsoft JDBC?


I figured out the problem: I had to remove 'microsoft' from my jdbc string and it worked.


That is, the jdbc string used to be


' jdbcUrl=jdbc:microsoft:sqlserver://<server name>:<port>;databaseName=<database>',


then I changed it to


' jdbcUrl=jdbc:sqlserver://<server name>:<port>;databaseName=<database>'


and that fixed the problem.