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 15:31:43 GMT

 Eric,

 I tried that, but I still get the same error...

Quoting "Roberts, Eric" <Eric.Roberts@one.at>:

> Roberto,
> 
> Subtle difference between my code and yours:
> 
>    ctx = new InitialContext();
>    Context envCtx = (Context) ctx.lookup("java:/comp/env/");
>    DataSource ds = (DataSource) envCtx.lookup("/jdbc/art");
> 
> Note the "/" characters after java:/comp/env
> and before jdbc/art
> 
> I was getting the same error with Oracle as you are with PostgreSQL.
> 
> -----Original Message-----
> From: Roberto Bouza [mailto:rbouza@efcholdings.com]
> Sent: Donnerstag, 05. Dezember 2002 15:47
> To: Tomcat Users List
> Subject: RE: java.sql.SQLException: Cannot load JDBC driver class 'null'
> 
> 
> 
>  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>
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
> 
> 


-- 
=             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