You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Charles Sabourdin <sa...@yahoo.com> on 2000/07/10 15:53:58 UTC

Probleme with ClassPath or something.

  Hello,
 I try to access a Mysql Database from my jsp
files And I receive:
"java.sql.SQLException: No suitable driver"
I know that means that my JVM (1.3) can not
access the drivers, but I have 
this message on start up
"Context log: path="/test" Adding context
path="/test"  docBase="webapps/test"
Starting tomcat. Check logs/tomcat.log for error
messages
Starting tomcat install="D:\Java\tomcat"
home="D:\Java\tomcat" classPath="D:\Jav
a\tomcat\classes;D:\Java\tomcat\lib\webserver.jar;D:\Java\tomcat\lib\jasper.jar;
D:\Java\tomcat\lib\xml.jar;D:\Java\tomcat\lib\servlet.jar;D:\Java\jdk1.3\lib\too
ls.jar;D:\Java\jdk1.3\lib\mysql.zip;D:\Java\jdk1.3\lib;"

so that suppose that my jar file (mysql.zip) is
in my CLASSPATH, so I try to set it into
"tomcat\lib", with no success has I try tu unzipp
it with no more succes.

Did I forgot something?

String defDBUrl =
"jdbc:mysql://192.168.111.200/test?user=XXX&password=xxxx";
	String DBUrl = request.getParameter("dburl");
	if (DBUrl == null)
		DBUrl = defDBUrl;
	request.setAttribute("dburl",DBUrl);	
	String fwd = "index.jsp";
	String action = request.getParameter("action");
	//init = null;
	if (init == null)
{
		try
		{
		    
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
		}
		catch (Throwable e)
		{
			e.printStackTrace();
		}
		application.setAttribute("init",new
Boolean(true));
}

__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail – Free email you can access from anywhere!
http://mail.yahoo.com/