Skip site navigation (1) Skip section navigation (2)

Not able to connect to postgresql database

From: Manohar Bhattarai <manoharbhattarai(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Not able to connect to postgresql database
Date: 2010-06-01 20:19:11
Message-ID: AANLkTinBl2QsPy0vCg0gN1fzy96ttltXpK0TVGqeiRlU@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Hi,

 I am a newbie for postgresql. I am trying to connect to postgresql database
using jdbc. I googled about it and got the Driver string and connection
string formats. I tried using some examples i got on the internet. But my
program is not able to connect to postgresql and shows an exception that it
cannot find driver. I am doing it in Ubuntu8.04 Linux with Postgresql 8.3
installed. I am using Eclipse galileo as IDE. I created database using
commands in terminal. I have added the external jar files for postgresql
jdbc connector(postgresql-8.3-603.jdbc3.jar, postgresql-8.3-603.jdbc4.jar,
postgresql-8.4-701.jdbc3.jar and postgresql-8.4-701.jdbc4.jar) in my project
also.

Please help me and let me know what i am doing wrong and what i am missing.
Can you please give an example code if possible?

Thanks
-- 
Regards,
Manohar Bhattarai (मनोहर भट्टराई)
Blogs:
http://manoharbhattarai.wordpress.com/
http://manoharbhattarai.posterous.com/
http://manoharbhattarai.blogspot.com/
Microblogs:
Twitter :- http://twitter.com/manoharmailme
Identi.ca :- http://identi.ca/manoharbhattarai

Responses

pgsql-jdbc by date

Next:From: Kevin GrittnerDate: 2010-06-01 20:27:39
Subject: Re: Not able to connect to postgresql database
Previous:From: Jason TesserDate: 2010-06-01 19:02:23
Subject: Re: Found a Bug in latest Driver (I THINK) and pg 8.4

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group