ironnsa.blogg.se

Cannot load jdbc driver class com mysql jdbc driver
Cannot load jdbc driver class com mysql jdbc driver







cannot load jdbc driver class com mysql jdbc driver

You can add MySQL JDBC connector driver by adding as dependencies in your gradle build file as shown below :Ĭompile 'mysql:mysql-connector-java:5.1.+' If you don't have MySQL driver JAR, you can download it from maven central library or directly from MySQL JDBC driver website. Find and add mysql-connector-java-5.1.25-bin.jar into Eclipse's classpath.

cannot load jdbc driver class com mysql jdbc driver

  • Choose Build Path and choose configure build path option.
  • Here are steps to add an external JAR into Eclipse's Classpath MySQL driver is a Type 4 JDBC driver, so you just need to add the JAR file in Eclipse. You need to add MySQL JDBC driver in your Eclipse Java project's classpath. Depending upon your build tool you can do the following to fix : in Eclipse, Maven, and Gradle.įixing : in Java and Eclipse If you are not sure how to set CLASSPATH, follow the instructions given in that article.

    cannot load jdbc driver class com mysql jdbc driver

    Solution : You can fix this error by deploying mysql-connector-java-5.1.25-bin.jar into your application's classpath. When Class.forName() method will execute at run-time, it will try to find the driver class provided as String argument and throw this error if its not able to find it on classpath. its not using any class or method from this JAR directly. Remember, there won't be any error during compile time because your program has no direct dependency to this JAR i.e.









    Cannot load jdbc driver class com mysql jdbc driver