简体   繁体   中英

Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader

how fix this problem? /I use Gradle/ Description:

Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource:

Property: driverclassname
Value: com.mysql.cj.jdbc.Driver
Origin: "driverClassName" from property source "source"
Reason: Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader

Action:

Update your application's configuration

One day I woke up, ran my IntelliJ, started the app and had the same problem. For a solution please check:

  1. Dependency 'mysql:mysql-connector-java' is exists.
  2. Class 'com.mysql.cj.jdbc.Driver' is exists through global search(ctrl+shift+n) -> classes.
  3. In IntelliJ: "File" -> "Invalidate Caches / Restart".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM