----------------------------------------------------------------
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!!!
----------------------------------------------------------------

Check your "jserv.properties" file in the Apache Jserv\conf directory.  Make
sure you have your "wrapper.classpath" set accordingly.

Jim

> -----Original Message-----
> From: Patrick Burleson [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, October 28, 1999 4:42 PM
> To:   Java Apache Users
> Subject:      JDBC Driver Loading Error
> 
> ----------------------------------------------------------------
> 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!!!
> ----------------------------------------------------------------
> 
> Hello all,
>  I have read through the FAQs that I could using the FAQ-o-Matic ( it
> seems to be on its way down though ) and I found a couple of entries
> regarding this subject, but none of the answers work.
> 
> My problem is that I am trying to connect to a mySQL database using the
> org.gjt.mm.mysql.Driver JDBC driver. The code works wonderfully on the
> command line. But, when I try to use it in a servlet context, I get a No
> sutiable driver error on my page and there is a Class not found error in
> the apache error log. 
> 
> Thinking maybe that my classpath was getting mangled, I am also printing
> out the entire system properties and the classpath variable is perfect. 
> 
> Any ideas out there? Has anyone else gotten this driver to connect to
> mySQL from Jserv? Is there something possibly wrong with the
> classLoader? 
> 
> here is the relevant code:
> 
> try{
>       Class.forName("org.gjt.mm.mysql.Driver").newInstance();
> }catch(Exception e){
>       out.println("Unable to load driver.<br>");
>       e.printStackTrace();
> }
> 
> 
> 
> The out variable is a PrintWriter received from a call to
> request.getWriter(). 
> 
> 
> The error from the Apache log is this:
> 
> java.lang.ClassNotFoundException: org.gtj.mm.mysql.Driver
>       at org.apache.java.lang.AdaptiveClassLoader.loadClass(Compiled Code)
>       at java.lang.ClassLoader.loadClass(Compiled Code)
>       at java.lang.Class.forName0(Native Method)
>       at java.lang.Class.forName(Compiled Code)
>       at test.doGet(CompiledCode)
>       at javax.servlet.http.HttpServlet.service(Compiled Code)
>       at javax.servlet.http.HttpServlet.service(Compiled Code)
>       at org.apache.jserv.JServConnection.processRequest(Compiled Code)
>       at org.apache.jserv.JservConnection.run(Compiled Code)
>       at java.lang.Thread.run(Compiled Code)
> 
> 
> Thanks for any help,
> 
> Patrick Burleson
> 
> 
> --
> --------------------------------------------------------------
> 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