File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Loading Driver Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Loading Driver Problem" Watch "Loading Driver Problem" New topic
Author

Loading Driver Problem

El Russell
Greenhorn

Joined: Sep 30, 2001
Posts: 2
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

Joined: Sep 18, 2001
Posts: 22
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.

Take care<BR>r@njith
El Russell
Greenhorn

Joined: Sep 30, 2001
Posts: 2
Thanks very much, but I had tried that too!
Elizabeth
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Loading Driver Problem
 
Similar Threads
refreshing a jsp - problem
Can't understand why I get the error
Forwarding to a servlet in GNUJSP
getting error...please help
How do i setup ODBC data source for mysql