Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Loading Driver Problem

 
El Russell
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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
 
Ranjith R
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks very much, but I had tried that too!
Elizabeth
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic