If you ever encounter a problem like this and try to solve it inside eclipse, go to
eclipse -> window -> preferences -> java -> buildpath -> classpath
and add the
"mysql-connector-java-5.1.22-bin.jar"
as new variable. Name it whatever you like. Hope this helps.