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

From John R Pierce
Subject Re: Not able to connect to postgresql database
Date
Msg-id 4C057195.3010102@hogranch.com
Whole thread Raw
In response to Re: Not able to connect to postgresql database  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-jdbc
Kevin Grittner wrote:
> Manohar Bhattarai <manoharbhattarai@gmail.com> wrote:
>
>
>> shows an exception that it cannot find driver.
>>
> 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.)
>

a further clarification, you need to specify the full path and name of
the jdbc jar file in the classpath, its not enough to drop
postgresql-8.4-701.jdbc4.jar into a dir thats in the classpath as it
won't recognize the filename.

btw, you only need one of the jdbc drivers, you listed several different
ones.



pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Found a Bug in latest Driver (I THINK) and pg 8.4
Next
From: Jason Tesser
Date:
Subject: Re: Found a Bug in latest Driver (I THINK) and pg 8.4