Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unable to load class org.gjt.mm.mysql.Driver

843854Oct 8 2002 — edited Oct 13 2002
Hi.

I am trying to connect to an db on a hosted Tomcatserver.

I have been told that the MySQL server is working just fine.

When I use this code:

Class.forName( "org.gjt.mm.mysql.Driver" );
Connection conn = DriverManager.getConnection("jdbc:mysql:://db_name","db_user","db_password" );

I get the following error message:

java.lang.ClassNotFoundException: Unable to load class org.gjt.mm.mysql.Driver
at org.apache.jasper.runtime.JspLoader.findClass(JspLoader.java, Compiled Code)
at org.apache.jasper.runtime.JspLoader.loadClass(JspLoader.java, Compiled Code)
at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java, Compiled Code)
at _0002fsql_0002ejspsql_jsp_3._jspService(_0002fsql_0002ejspsql_jsp_3.java, Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java, Compiled Code)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java, Compiled Code)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled Code)
at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java, Compiled Code)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java, Compiled Code)
at java.lang.Thread.run(Thread.java, Compiled Code)

Can anybody give me an idear of what to do or try.

Best Regards

Soren, Denmark
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 10 2002
Added on Oct 8 2002
3 comments
447 views