jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes Can't find mySQL driver when use java as CGI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Can Watch "Can New topic

Can't find mySQL driver when use java as CGI

Frank Ying

Joined: Jun 29, 2001
Posts: 5
I wrote a java problem called 'search.java' as CGI, that search the mySQL database. I got error said "java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver". Here is my cgi to call the java class: java -classpath /home/frank/cgi-bin/advd:/home/frank/jdk1.3.1_02:/home/frank/var/driver.jar:/home/frank/cgi-bin search $QUERY_STRING
the mySQL driver is /home/frank/var/driver.jar
Thanks for help.
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp .
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please re-register and select a new name which meets the requirements.
I agree. Here's the link: http://aspose.com/file-tools
subject: Can't find mySQL driver when use java as CGI
It's not a secret anymore!