9 messages in com.mysql.lists.javaRe: MM.MySQL install
FromSent OnAttachments
Michael Collins10 Mar 2001 20:03 
Michael Bang11 Mar 2001 01:00 
Michael Collins11 Mar 2001 07:36 
Artigas, Ricardo Y.11 Mar 2001 17:21 
Michael Collins11 Mar 2001 19:34 
Artigas, Ricardo Y.11 Mar 2001 20:00 
Michael Collins12 Mar 2001 09:35 
Mark Matthews12 Mar 2001 09:55 
Michael Collins12 Mar 2001 12:41 
Subject:Re: MM.MySQL install
From:Mark Matthews (mmat@thematthews.org)
Date:03/12/2001 09:55:31 AM
List:com.mysql.lists.java

Have you read the documentation that comes with the driver? Have you read your servlet engine documentation? There is enough between the two to do the install.

This is not an mm.mysql issue...Tomcat does not use your CLASSPATH environment variable to determine the classpath...It either uses the WEB-INF/classes/lib directory (as specified in the servlet spec), or classes you append in it's startup file, or you can dump the driver in your JRE's lib/ext directory (usually in $JAVA_HOME/jre), and it will be found by all applications that use your JDK/JRE.

-Mark

Thanks to all who have attempted to help me on this. My path and class path are as shown in my previous message. I have also used chmod 777 on my class, the directory that contains it, the mm.mysql-2.0.4-bin.jar file, and the folder that contains that. Yes, I know that goes to far but I want to make sure permissions are not the issue. I have also tried to run the class as root. I have also used the -classpath option as was suggested. None of this works and the driver is still not found.

Is someone sure that you need to use the mm.mysql-2.0.4-bin.jar that is the BIN version in the class path, someone mentioned the need for a mysql.jar and to put into the tomcat lib directory. Isn't there are straight forward instructions for version 2? Or do I need to wait until v2 is finalized?

Does anyone have a suggestion for a different jdbc driver for MySQL that the MM driver, hopefully one that is better documented???

Thanks in advance

Michael Collins

At 12:01 PM +0800 3/12/01, Artigas, Ricardo Y. wrote:

when compiling, try: javac -classpath /extra/sql-jdbc/mm.mysql-2.0.4-bin.jar:/extra/tomcat/lib Contacts.java

when running, try: java -classpath /extra/sql-jdbc/mm.mysql-2.0.4-bin.jar:/extra/tomcat/lib Contacts

or maybe check if you have permission for the /extra/sql-jdbc/mm.mysql-2.0.4-bin.jar file. HTH. :^) Ricky Y. Artigas Analyst/Programmer

-----Original Message----- From: Michael Collins [SMTP:mcol@kuwago.com] Sent: Monday, March 12, 2001 11:35 AM To: ja@lists.mysql.com Subject: Re: MM.MySQL install

Sorry to be so dense but I cannot seem to get past specifying the class path properly.

% echo $PATH /usr/java/jdk1.3.0_02/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin % echo $CLASSPATH /extra/sql-jdbc/mm.mysql-2.0.4-bin.jar:/extra/tomcat/lib: % ls /extra/sql-jdbc/mm.mysql-2.0.4-bin.jar /extra/sql-jdbc/mm.mysql-2.0.4-bin.jar % java Contacts Unable to load driver. java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:297) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286) 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 Contacts.<init>(Contacts.java:24) at Contacts.main(Contacts.java:162) SQLException: No suitable driver SQLState: 08001 VendorError: 0

Line 24 (in my class that compiles w/o error):

Class.forName("org.gjt.mm.mysql.Driver").newInstance(); -- Michael

To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail java@lists.mysql.com instead.