The error occurs when we are trying to connect to the MySql (or any other) database that is existing on your local machine, i.e., localhost, and listens to the specified port number which is set for the mysql and it founds that either no JDBC driver was registered before invoking the DriverManager.getConnection () method or we might not have added the MySQL JDBC driver to the classpath in the IDE. ![]() Generally, "no suitable driver found" refers to throwing an error, i.e., " : No suitable driver found for jdbc:mysql://localhost:3306/test" in the console. To know more about JDBC Drivers, do visit: section of our Java tutorial. These JDBC divers are:Īll four drivers have their own usage as well as pros and cons. In JDBC, there are four different types of drivers that are to be used as per the requirement of the application. The JDBC driver can be understood as a driver that lets the database and Java application interact with each other. The JDBC (Java Database Connectivity) Driver is a driver that makes connectivity between a database and Java software. In this section, we will discuss why we get such an error and what should be done to get rid of this exception so that it may not occur the next time.īefore discussing the exception, we should take a brief knowledge that what is a JDBC Driver. ![]() No suitable driver found for JDBC is an exception in Java that generally occurs when any driver is not found for making the database connectivity. Next → ← prev No Suitable Driver Found For JDBC
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |