Maybe it's because JServ does not use the CLASSPATH to look for classes.
Instead it uses its wrapper.classpath settings in jserv.conf (or was it
jserv.properties?).
Make sure that your jdbc driver class is included there!

Steve Ruby wrote:
> 
> I'm not sure who to send this too, but I've read much
> documentation and I can't figure out why I can't get a jdbc
> driver or two to work in my servlets
> 
> The first few lines of service
> are
> 
>     public void service (
>         HttpServletRequest      request,
>         HttpServletResponse     response
>     ) throws ServletException, IOException
>     {
>         PrintWriter             out;
>         String                  title = "Simple Servlet Output";
> 
>         String dead = "default";
> 
>         try {
>                 Class.forName("org.gjt.mm.mysql.Driver");
>                 Connection con =
> 
>DriverManager.getConnection("jdbc:mysql://db.domain.com:3306/AMR?user=root&password=");
>                 System.out.println("Connected to the db");
>                 dead = "but I'm not dead yet";
>         }
>         catch (ClassNotFoundException e) {
>                 System.out.println("Couldn't find class: " +
> e.getMessage());
>                 dead = "died- ClassNotFoundException";
> 
>         }
>         catch (SQLException se){
>                 System.out.println("SQL Exception caught: " + se);
>                 dead = "died- SQLException";
>         }
> 
> If I print dead it is always "died-ClassNotFoundException,
> yet if I
> do
> import org.gjt.mm.mysql.Driver
> 
> and verbose on compile I get this:
> why won't forName find it?
> 
> [loaded
> c:\java\mm.mysql.jdbc-1.2a\mysql.jar(org/gjt/mm/mysql/Driver.class) in 94
> ms]
> 
> sorry to send this to this list, it is probably not a jserv problem.
> 
> TIA
> Steve
> 
> -- --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> READ THE FAQ!!!!     <http://java.apache.org/faq/>
> Archives and Other:  <http://java.apache.org/main/mail.html/>
> Problems?:           [EMAIL PROTECTED]

-- 
Guenther Wieser      
creative-it/Guenther Wieser Software KEG
Student of Telematik at Graz University of Technology
http://www.creative-it.com        mailto:[EMAIL PROTECTED]
-> In A World Without Walls And Fences, Who Needs Windows And Gates? <-


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

Reply via email to