Hi,
When ever the ClassNotFoundException for com.mysql.jdbc.Driver,
make sure you have added the mysql-connector-java-5.1.17.jar (available on mysql site) in the jre/lib/ext directory.
I was using it with my maven build Spring MVC project and was cursing it unnecessarily.
Happy coding,
Shoeb
This is too frequent an error. java.lang.ClassNotFoundException comes because ClassLoader fails to load the class requested at runtime.This is mostly an environmental issue which depends upon whether request class is present in Classpath or not.to solve this error best approach is to first find the jar file in which problematic class exists and then examine your classpath.also don't confuse this with NoClassDefFoundError which is entirely different , for details see here NoClassDefFoundError vs ClassNotFoundException in Java
ReplyDeleteIt solves that issue....
ReplyDeletethanks.
Jugal
Thank you! Your Post helped me solve my issue
ReplyDelete-Shanker
great help..thank u
ReplyDeletei did add the connector in jre/lib/ext and jre/lib but still i m getting the same error.
ReplyDeletePlz help me on this, its very urgent
Yeeah it's pretty simple :) . Thank you, it solves my issue. Martin
ReplyDeletei have already added jar file of mysql still the same error.............main thing is for some calls it is running.......for others it is not..............plz help me.......
ReplyDelete