1This error occurs if JDBC is not able to find a suitable driver for
2the URL format passed to the getConnection()
3method e.g."jdbc:mysql://" in our case.
4
5In order to solve this error,
6you need the MySQL JDBC driver like
7"mysql-connector-java-5.1.36.jar" in your classpath.
1Connection con = null;
2try {
3 //registering the jdbc driver here, your string to use
4 //here depends on what driver you are using.
5 Class.forName("something.jdbc.driver.YourFubarDriver");
6 con = DriverManager.getConnection("jdbc:apache:commons:dbcp:test");
7} catch (SQLException e) {
8 throw new RuntimeException(e);
9}