Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java.sql.sqlexception: no suitable driver found

This error occurs if JDBC is not able to find a suitable driver for
the URL format passed to the getConnection()
method e.g."jdbc:mysql://" in our case.

In order to solve this error,
you need the MySQL JDBC driver like
"mysql-connector-java-5.1.36.jar" in your classpath.
Comment

no suitable driver found for jdbc:mysql

Connection con = null;
try {
    //registering the jdbc driver here, your string to use 
    //here depends on what driver you are using.
    Class.forName("something.jdbc.driver.YourFubarDriver");   
    con = DriverManager.getConnection("jdbc:apache:commons:dbcp:test");
} catch (SQLException e) {
    throw new RuntimeException(e);
}
Comment

No suitable driver found for jdbc:mysql:U+202A//localhost:3306//mulesoft

Driver driver = new oracle.jdbc.OracleDriver();
DriverManager.registerDriver(driver);
Connection conn = DriverManager.getConnection(url, user, password);
// ... 
// and when you don't need anything else from the driver
DriverManager.deregisterDriver(driver);
Comment

no suitable driver found for jdbc:mysql:


Try putting the driver jar in the server lib folder. ($CATALINA_HOME/lib)

I believe that the connection pool needs to be set up even before the application is instantiated. (At least that's how it works in Jboss)
Comment

PREVIOUS NEXT
Code Example
Java :: java actionevent 
Java :: spark write partitionby 
Java :: button getsource 
Java :: integer to binary java 
Java :: do statement java 
Java :: check if field exists in java 
Java :: reverse number java 
Java :: javafx get the controller of a pane 
Java :: reverse java 
Java :: how to use ListIterator in java 
Java :: arrays.sort with comparator 
Java :: binary search java 
Java :: concurrenthashmap in java 
Java :: argumentcaptor java mockito 
Java :: declare generic set java 
Java :: long to int java 
Java :: public class HelloWorld{ public static void main(String []args){ System.out.println("Hello World"); } } 
Java :: unchecked exception in java 
Java :: loop array using stream java 
Java :: spiral traversal of matrix leetcode 
Java :: FlutterSound.java uses or overrides a deprecated API. 
Java :: kruskal java 
Java :: How to run bootRun with spring profile via gradle task 
Java :: How to merge two sorted arrays into a single sorted aggregate one? 
Java :: java generics 
Java :: transformer un string en Biginteger java 
Java :: what are parameters in java 
Java :: do function after time android studio 
Java :: split string into array java 
Java :: java synchronized method 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =