Hi,

I'm new to MySQL database.
I downloaded MySQL database version 3.23.32 and I create a table
in the database (database name is "test_data" and
the table name is "data").

Then I download the driver MyODBC 2.50.36 for NT(full setup) and
fill out the table.

I wrote a servlet program (run on Tomcat 3.1) and try to access the database 
throught the ODBC, I got the "ClassNotFoundException"
error message.

I set the DriverName = "org.gjt.mm.mysql.Driver"
and URL = "jdbc:mysql:test"

Can someone tells me how can I fix this?
Is my procedure correct?
Can someone give me an example how to connect to the mysql database
from a servlet?

Thanks,
Cathy



Here's is the message:
--------------------------------------------------------
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver at 
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:450) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at 
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at 
java.lang.Class.forName0(Native Method) at 
java.lang.Class.forName(Class.java:120) at 
Benchmark_sql.query(Benchmark_sql.java:91) at 
Benchmark_sql.doGet(Benchmark_sql.java:47) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503) 
at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597) 
at 
org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503) 
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
 
at 
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338) 
at java.lang.Thread.run(Thread.java:484)
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to