You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "d.mills@tiscali.fr" <d....@tiscali.fr> on 2005/03/18 13:44:08 UTC

[tomcat-user] Postgres + JDBC

First of all, hello to the groupe.

I'm a newbi as far as tomcat is concerned, so if this is
really stupid, sorry for wasting your time.

I'm trying to get a JDBC Data pool connection up using
Tomcat and postgres SQL.

My JNDI source is configured, and when I :
Context initContext = new InitialContext();
Context envContext  =
(Context)initContext.lookup("java:/comp/env");
DataSource ds = (DataSource)envContext.lookup("jdbc/postgres");

I get a Datasource with all the details I entered.

The problem is that when I try to connect, I get the
following error:

Cannot create JDBC driver of class 'org.postgresql.Driver'
for connect URL 'jdbc:postgres://10.201.1.10/QCM'

postgres-8.0.309.jdbc3.jar is in common/lib, yet removing
it, or movining it to shared/lib or $WEBAPP/WEB-INF/lib
doesn't change the error.

I'm running postgresql 8.0 and tomcat 5.0.28.

TIA for your time, all suggestions greatly appreciated.

David

************************ ADSL JUSQU'A 8 MEGA + 3 MOIS DE TELEPHONE GRATUIT ************************
L'ultra haut débit à 15EUR/mois seulement ! Et vous téléphonez gratuitement en France vers les postes fixes,
hors numéros spéciaux pendant 3 mois.
Pour profiter de cette offre exceptionnelle, cliquez ici : http://register.tiscali.fr/adsl/  (voir conditions sur le site)



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


Re: [tomcat-user] Postgres + JDBC

Posted by Antony Paul <an...@gmail.com>.
Try changing the url to postgresql instead of postgres.


On Fri, 18 Mar 2005 13:44:08 +0100, d.mills@tiscali.fr
<d....@tiscali.fr> wrote:
> First of all, hello to the groupe.
> 
> I'm a newbi as far as tomcat is concerned, so if this is
> really stupid, sorry for wasting your time.
> 
> I'm trying to get a JDBC Data pool connection up using
> Tomcat and postgres SQL.
> 
> My JNDI source is configured, and when I :
> Context initContext = new InitialContext();
> Context envContext  =
> (Context)initContext.lookup("java:/comp/env");
> DataSource ds = (DataSource)envContext.lookup("jdbc/postgres");
> 
> I get a Datasource with all the details I entered.
> 
> The problem is that when I try to connect, I get the
> following error:
> 
> Cannot create JDBC driver of class 'org.postgresql.Driver'
> for connect URL 'jdbc:postgres://10.201.1.10/QCM'
> 
> postgres-8.0.309.jdbc3.jar is in common/lib, yet removing
> it, or movining it to shared/lib or $WEBAPP/WEB-INF/lib
> doesn't change the error.
> 
> I'm running postgresql 8.0 and tomcat 5.0.28.
> 
> TIA for your time, all suggestions greatly appreciated.
> 
> David
> 
> ************************ ADSL JUSQU'A 8 MEGA + 3 MOIS DE TELEPHONE GRATUIT ************************
> L'ultra haut débit à 15EUR/mois seulement ! Et vous téléphonez gratuitement en France vers les postes fixes,
> hors numéros spéciaux pendant 3 mois.
> Pour profiter de cette offre exceptionnelle, cliquez ici : http://register.tiscali.fr/adsl/  (voir conditions sur le site)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


-- 
rgds
Antony Paul
http://www.geocities.com/antonypaul24/

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