Tag Archives: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: Cannot find class: com.mysql.cj.jdbc.Driver

Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: Cannot find class: com.mysql.cj.jdbc.Driver

Error: error setting driver on unpooleddatasource. Cause: java.lang.classnotfoundexception: cannot find class: com.mysql.cj.jdbc.driver

 

 

 

Error probability:

1. XML Mapping error, check completed, yes;

2. The driver is wrong, there are more spaces, and so on,

3. Compared with others, it is still wrong under the same code.

  

Looking for errors from three, it’s not code, it’s dependency. Check it. I import the mysql5 package

 

 

The culprit!

replace

 

 

Run successfully!!!! I’ve been looking for my website for a long time. It’s really important to find the wrong one