Copied Intellij project folder (backup) does not find mysql driver

Answered

I have an IntelliJ project (Maven build) with a database connection via DB Browser plug-in.  It connects and runs fine.  However, if I make a back up by copying the IntelliJ project folder, it fails to build with “No suitable driver found for jdbc:mysql://localhost:3306/newMusicDB.”

The driver is set the same (from /usr/share/java/mysql-connector-j-9.0.0.jar), all the Connector settings are the same.  If I try “Test Connection” from DB Browser settings, it is successful.  But on build, it fails as above.

So I wonder, what does not get copied or set when copying the entire project folder?

Recently I took up a project that had been idle for about 2 years, and upgraded the IDE, Maven and the mysql driver.  I mention this because I am suspicious that there's something with Maven that's giving me this grief.

Thanks for any help!  It's not comfortable coding with no back up (at least, no functioning one).

0
1 comment

Hello!

How this dependency is declared in Maven's pom.xml?

Can you confirm the JAR is listed as a part of the classpath when you are running the copy of your Project?

0

Please sign in to leave a comment.