0

I got this error when I use Class.forName[...]. I used the JConnector MSI Installer (http://dev.mysql.com/downloads/connector/j/5.1.html) so I got no ZIP file to add to my build path or I don't know where the installer put it.

Any ideas?

Dyrdek
  • 411
  • 4
  • 12
  • 33

1 Answers1

1

Try to insert this:

DriverManager.registerDriver(new com.mysql.jdbc.Driver());

before getting the JDBC Connection.

Other option :

1: Download the mysql-connector-java.jar

2: You need to drop JAR in /WEB-INF/lib folder.

3: properties of project->build path->add JAR and selected the JAR above.

Shiladittya Chakraborty
  • 4,270
  • 8
  • 45
  • 94