Re: Not able to connect to postgresql database - Mailing list pgsql-jdbc

From Kevin Grittner
Subject Re: Not able to connect to postgresql database
Date
Msg-id 4C0526EB0200002500031C7D@gw.wicourts.gov
Whole thread Raw
In response to Not able to connect to postgresql database  (Manohar Bhattarai <manoharbhattarai@gmail.com>)
Responses Re: Not able to connect to postgresql database  (John R Pierce <pierce@hogranch.com>)
Re: Not able to connect to postgresql database  (Lew <noone@lewscanon.com>)
List pgsql-jdbc
Manohar Bhattarai <manoharbhattarai@gmail.com> wrote:

> shows an exception that it cannot find driver.

> Please help me and let me know what i am doing wrong and what i am
> missing.

The jar is not on your classpath, or you are not spelling the class
name ("org.postgresql.Driver") correctly.  I don't know of any other
reason that the recommended class loading:

    Class.forName("org.postgresql.Driver");

would throw a ClassNotFoundException.  (If that's not what you're
doing, or that's not the statement on which it fails, or that's not
your exception, you need to give us more clues.)

> Can you please give an example code if possible?

There are examples here:

http://jdbc.postgresql.org/documentation/84/index.html

-Kevin

pgsql-jdbc by date:

Previous
From: Manohar Bhattarai
Date:
Subject: Not able to connect to postgresql database
Next
From: Kris Jurka
Date:
Subject: Re: Found a Bug in latest Driver (I THINK) and pg 8.4