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

huangapple go评论86阅读模式
英文:

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

问题

如何修复这个问题?/我在使用Gradle/
描述:

无法将属性绑定到com.zaxxer.hikari.HikariDataSource:

属性:driverclassname
值:com.mysql.cj.jdbc.Driver
来源:属性源“source”的“driverClassName”
原因:无法在HikariConfig类加载器或线程上下文类加载器中加载驱动程序类com.mysql.cj.jdbc.Driver

操作:

更新您的应用程序配置

英文:

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

答案1

得分: 6

一天,我醒来后,打开了我的IntelliJ,启动了应用程序,但出现了相同的问题。
关于解决方法,请检查:

  1. 依赖项 'mysql:mysql-connector-java' 是否存在。
  2. 类 'com.mysql.cj.jdbc.Driver' 是否存在于全局搜索(ctrl+shift+n)的结果中 -> 类。
  3. 在IntelliJ中:选择 "文件" -> "Invalidate Caches / Restart"。
英文:

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".

huangapple
  • 本文由 发表于 2020年8月20日 05:20:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/63495169.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定