• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Loading Driver Problem

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not able to load the database driver with the following setup: Apache JServ and GNUJSP, the mm.mysql-2.0.4 driver and jdk1.1.8 running under FreeBSD.
The code to load the driver is:
<%@page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*"%>
<%@ include file="Connections/connZeagleJSP.jsp" %>
<%<br /> // *** Validate request to log in to this site.<br /> String MM_LoginAction = request.getRequestURI();<br /> if (request.getQueryString() != null && request.getQueryString().length() > 0) MM_LoginAction += "?" + request.getQueryString();
String MM_valUsername=request.getParameter("user");
if (MM_valUsername != null) {
String MM_fldUserAuthorization="";
String MM_redirectLoginSuccess="dlr_welcome.jsp";
String MM_redirectLoginFailed="dlr_badlogin.jsp";
String MM_redirectLogin=MM_redirectLoginFailed;

Driver MM_driverUser = (Driver)Class.forName("org.gjt.mm.mysql.Driver").newInstance();

The driver location is specified in the CLASSPATH environment variable in the shell startup script. I have tried locating the driver in a variety of places and modifying the CLASSPATH each time. I still get the CassNotFound exception. Is there some reason why GNUJSP wouldn't be able to locate the driver?
Thanks for any help
Elizabeth
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
dont have much idea but give this a try..

if you haven't included the whole path, including the jar file name in classpath variable do it..

ex: /usr/local/xx/yy/zz/driverfile.jar

try including the whole file path. instead of location.
 
El Russell
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks very much, but I had tried that too!
Elizabeth
 
look! it's a bird! it's a plane! It's .... a teeny tiny ad
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic