----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Yes. I am using jdbc with mysql and the mm driver and it works.  The call is
exactly like yours.
In my CLASSPATH is (among other things)
:/home/lou:/home/lou/mm.mysql.jdbc-1.2b
(It is not refered to by a wrapper.classpath directive.)
This may be the problem.

lou

(ps: I also have a version working with the twz jdbc driver)

-----Original Message-----
From: Kate Dubiel <[EMAIL PROTECTED]>
To: Java Apache Users <[EMAIL PROTECTED]>
Date: Tuesday, December 07, 1999 7:27 PM
Subject: Class Not Found With mm.mysql


>----------------------------------------------------------------
>BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
>WHEN YOU POST, include all relevant version numbers, log files,
>and configuration files.  Don't make us guess your problem!!!
>----------------------------------------------------------------
>
>I have found numerous posts in the newsgroup archives and FAQ's from
>people with a similar problem to the one I describe here, but so far
>have found no solutions, just a lot of follow-up questions and "try
>this, try that" responses.
>
>I want to develop servlets that access a MySQL database.  On my system,
>MySQL is up and running.  Apache, the JDK, the JSDK, JServe, and the
>JServe SSI module are all functioning nicely together (amazingly
>enough); I can run "normal" servlets on this setup with no problems.
>
>
>THE PROBLEM
>
>The problem is the JDBC driver, or more specifically, JServe's ability
>to locate the driver.  When I run a servlet which makes use of the JDBC
>driver, with the following from my Java code:
>
>  // Load the MySQL driver
>  Class.forName("org.gjt.mm.mysql.Driver").newInstance();
>
>I get a "Document contains no data" in my browser, and the following
>message in my /var/log/httpd/error_log file:
>
>Unable to find Driver.class.java.lang.ClassNotFoundException:
> org.gjt.mm.mysql.Driver.class
> at org.apache.java.lang.AdaptiveClassLoader.loadClass
> (AdaptiveClassLoader.java:437)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java)
> at RandomQuote.doGet(RandomQuote.java:19)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:270)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
> at org.apache.jserv.JServConnection.processRequest
> (JServConnection.java:314)
> at org.apache.jserv.JServConnection.run
> (JServConnection.java:188)
> at java.lang.Thread.run(Thread.java)
>
>
>MY SETUP:
>
>Red Hat Linux 6.0
>Apache 1.3
>JDK 1.1.7 v 3 (I didn't get 1.2 because Blackdown only has that in
>pre-release)
>JSDK 2.0
>Apache JServ 1.1b2
>Apache JServ SSI 1.1.2
>MySQL 3.22.27
>mm.mysql JDBC Driver 1.2b
>
>mm.mysql is in a directory structure like this:
>
><root>
>  mm.mysql.jdbc-1.2b
>    mysql_comp.jar   (compressed jar file)
>    mysql_uncomp.jar (uncompressed jar file)
>    org
>      gjt
>        mm
>          mysql
>            *.class files
>            *.java files
>
>My /etc/httpd/conf/jserv.properties file contains the following:
>
>wrapper.classpath=/usr/lib/apache/ApacheJServ.jar
>wrapper.classpath=/home/httpd/classes/servlet-2.0.jar
>wrapper.classpath=/mm.mysql.jdbc-1.2b/mysql_uncomp.jar
>
>There is currently nothing from the mm.mysql JDBC drivers included in
>any wrapper.path or repositories directive.  (Should there be???  I have
>seen posts suggesting trying this, and I have tried adding the path to
>this driver to those parameters, but with no success.)
>
>
>WHAT I'VE ALREADY TRIED
>
>To save time, here is a list of things I found in the FAQ's to try that
>I have already tried and have not solved the problem:
>
> - I tried recompiling the mysql_uncomp.jar file (on the possibility it
>may be corrupt).
>
> - I tried moving the .jar file into the Java class directory (and
>changing both the environment classpath and wrapper classpath
>accordingly), on the possibility there may be some attribute of the
>mm.mysql directory that was preventing JServe from "seeing" it.
>
> - I tried (as mentioned above) adding the path to the jar file to the
>wrapper classpath.  (I left it that way, even when that didn't fix the
>problem because I still think it should be there.)
>
>- I tried adding the path to the jar file to the wrapper path, in
>addition to adding it to the classpath.
>
>- I tried adding the path to the JDBC class files to the servlet zone
>repositories, in addition to having the jar file in the wrapper
>classpath.  It was something to try, anyway.
>
>- I tried adding the path to the JDBC jar and class files to the wrapper
>file path.
>
>
>MY QUESTIONS (other than, "Why isn't it working?"):
>
>Does, or does not, JServ use the environment variables CLASSPATH, PATH,
>and/or JAVA_HOME?  I've seen one post that says JServ ignores the
>environment variables by default and uses its wrapper settings, and
>another one which says you must set the environment variables for JServ
>to be able to find all the classes and Java executables.  Can someone
>clarify this for me?
>
>Is there any document or Howto that deals comprehensively with all the
>things that must be done to get additional librarys to work with JServ
>(all the parameters that need to be set, etc.)?  The installation Howto
>that came with JServ is good, but it only deals with getting JServ to
>work.  What are some of the principals we need to be aware of when
>adding java libraries to work with it?
>
>Is there anyone "out there" who is using JServ with mm.mysql
>successfully?  I'd love to hear from you.
>
>Thanks,
>Kate
>
>
>--
>--------------------------------------------------------------
>Please read the FAQ! <http://java.apache.org/faq/>
>To subscribe:        [EMAIL PROTECTED]
>To unsubscribe:      [EMAIL PROTECTED]
>Archives and Other:  <http://java.apache.org/main/mail.html>
>Problems?:           [EMAIL PROTECTED]
>



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to