I encountered the same problem and what I did to solve it:
Downloaded the .jar accordingly to the server used:
For mySQL I downloaded mysql-connector-java-5.1.18-bin.jar
Added CLASSPATH in SYSTEM VARIABLES with the whole name of the .jar used. If you already have CLASSPATH var then add in it, as in PATH ";Path to Jar/jar file name" something like:
CLASSPATH = d:\requisites\mySQL_connector\mysql-connector-java-5.1.18-bin.jar
In Eclipse project:
Right click on project->Build Path-.Configure build path. Add external JARs and add the jar file. When you succesfully do this step it will appear on the project in "Reference Libraries"
An important step(if you use Android Development Tools framework as I am using) is to add also that JAR file in libs folder of your app. I did this by copy-paste the jar from my path(d:\requisites\mySQL_connector) to libs folder of my project.
Restarted the project and it worked on second run.