tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roberto Bouza <rbo...@efcholdings.com>
Subject RE: java.sql.SQLException: Cannot load JDBC driver class 'null'
Date Thu, 05 Dec 2002 14:47:05 GMT

 Well...

 I forgot to put a part of my .java is like this:

 ------------------ DBTest.java ----------------------

  Context ctx = new InitialContext();
	    
  if(ctx == null ) 
	throw new Exception("Boom - No Context");
	    
  Context envContext  = (Context)ctx.lookup("java:/comp/env"); 
  DataSource ds = (DataSource)envContext.lookup("jdbc/art");

  // I tested both ways
  //DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/art");

  if (ds != null) {
     Connection conn = ds.getConnection();

   .....

 ------------------- END DBTest.java ---------------

 The weird thing is I create a simple class DB, to load the PostgreSQL Driver,
connect to the database and do some simple queries - The driver is in my
$CATALINA_HOME/common/lib - and all works fine I can load the driver without any
problem... but, when I used the DBCP - BOOM!!!! - java.sql.SQLException: Cannot
load JDBC driver class 'null'...

 Thanks you for your help.

-- 
=             Roberto Bouza Fraga               =
===================================
      Research & Development Engineer
       Ella Cisneros Fontanals Holdings
 Ph: (305)-860-0116 / Fax:(305)-860-9401
===================================
       e-Mail:rbouza@efcholdings.com

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message