It's a fundamental question but it's a really annoying issue when starting with mule
Error: "Cannot load class 'com.mysql.jdbc.Driver'". Caused by: java.sql.SQLException: Error trying to load driver: com.mysql.jdbc.Driver : Cannot load class 'com.mysql.jdbc.Driver': [ com.mysql.jdbc.Driver, Cannot load class 'com.mysql.jdbc.Driver': [ Class 'com.mysql.jdbc.Driver' blablablablablablablablablablablablablablablabla
That is very likely because I don't have the mysql connector jar as a pom dependency. But when I added it to the pom file, the error persisted and I could not find the way to force a dependencies update.
I added manually the library inside classpath but still not working.
CodePudding user response:
The first step is remove ALL library or reference to a MySQL connector inside the proyect.
So, when you go to setup your connection, will find something like next image:
Configure->Add maven Dependency
This new windows has been open and you only need to place the right mysql version:
After that, just setup your connection and voilá!
Curiosly, instead of a Success Connection Test, the error persists when the next flow component (Transform Message) tries to update metadata
After one hour I restarted the IDE and Magic happens! It's working.