Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Load Mysql-connector in eclipse
i am trying to create a Vaadin Application.
I want to user Mysql with the with SimpleJDBCConnectionPool.
I got this code from the Tutorial:
connectionPool = new SimpleJDBCConnectionPool( "com.mysql.jdbc.Driver", "jdbc:mysql://192.168.254.100:3306/addressbook", "root", "123abcABC");
The Problem is, that i got this error:
SEVERE: Servlet.service() for servlet [Addressbook Application] in context with path [/AddressBook] threw exception [java.lang.RuntimeException: Specified JDBC Driver: com.mysql.jdbc.Driver - initialization failed.] with root cause java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
I found some threads with the problem and they all fixed it, by adding the mysql-connector to the project. But i tried and i didnt get it to work in eclipse.
I copied the jar (downloaded from mysql) to my projectfolder in new folder libs.
Then i added the Jar like this: Rightclick on Project -> Properties -> Java Build Path -> Libaries -> Add Jar and then i got the "Folder" Addressbook/libs/mysql-connector-java220.127.116.11-bin.jar.
But the problem still persists.
How do i add the jar correctly to eclipse project ?
Thanx for helping me.
copy the driver mysql-connector-java18.104.22.168-bin.jar also into the directory
Thank you Norbert!
That did the trick :)
I was quite sure its just a little fail.