tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@linuxfreemail.com
Subject connection to mysql (newbie)
Date Mon, 29 Oct 2001 12:52:15 GMT
Hi my name's Filippo Bersani and I'm a italian university student.

I'm trying to build a web application using Mysql 3.22.32, Tomcat v
3.3 rc 2 and Jsp, for a university project, so as you can guess I'm a newbie here.
I'm working with  Suse 7.0 Linux os
I'm using the driver mm.mysql.jdbc-2.0.4
I have to say that I don't know Java very well. I'm studying it now, anyway I
followed all the steps to install the driver, I think.

I have put the mysql.jar (I mean just the jar file after that I unpacked the
file that I downloaded)  in the lib/common directory of tomcat but it
didn't work.

It seems to me that all has been done like the Tomcat's manual suggests.

this is the code that I use to connect me to mysql in my jsp file:

<%@page language="java" import="java.sql.*"%>
<% 
 Connection dbconn=null;
 Class.forName("org.git.mm.mysql.Driver");

dbconn=DriverManager.getConnection("jdbc:mysql://localhost/test","myusn","mypwd");
.......
%>

this is the message error that I get when I load the file:

Error: 500

Location: /hello.jsp

Internal Servlet Error:

javax.servlet.ServletException: org.git.mm.mysql.Driver
        at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:460)
        at hello_3._jspService(hello_3.java:88)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:484)
        at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
        at org.apache.tomcat.core.Handler.service(Handler.java:235)
        at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:432)
        at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:915)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:831)
        at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:161)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:477)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:517)
        at java.lang.Thread.run(Thread.java)

Root cause:
java.lang.ClassNotFoundException: org.git.mm.mysql.Driver
        at org.apache.tomcat.util.depend.DependClassLoader.loadClassInternal1(DependClassLoader.java:186)
        at org.apache.tomcat.util.depend.DependClassLoader.loadClass(DependClassLoader.java:148)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java)
        at hello_3._jspService(hello_3.java:55)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:484)
        at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
        at org.apache.tomcat.core.Handler.service(Handler.java:235)
        at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:432)
        at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:915)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:831)
        at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:161)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:477)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:517)
        at java.lang.Thread.run(Thread.java)


I tried to find help in the Tomcat' and mysql.jdbc-2.0.4 manuals. I tried with
JDBC and Tomcat documentetion on line but I didn't find
anything, I tried a research in this mailing list too. Could I have some help
or are there other sites where I can look? 
 thanks a lot for your time

filippo bersani

Get your own FREE E-mail address at http://www.linuxfreemail.com
Linux FREE Mail is 100% FREE, 100% Linux, and 100% yours!

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message