pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John R Pierce <pierce@hogranch.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Not able to connect to postgresql database
Date: Tue, 01 Jun 2010 13:46:13 -0700
Message-ID: <4C057195.3010102@hogranch.com> (raw)
In-Reply-To: <4C0526EB0200002500031C7D@gw.wicourts.gov>
References: <AANLkTinBl2QsPy0vCg0gN1fzy96ttltXpK0TVGqeiRlU@mail.gmail.com>
	<4C0526EB0200002500031C7D@gw.wicourts.gov>

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.





view thread (13+ messages)  latest in thread

Message-ID: <4C057195.3010102@hogranch.com>
Permalink:  ../4C057195.3010102@hogranch.com/
Also on:    postgresql.org/message-id/4C057195.3010102@hogranch.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: pierce@hogranch.com
  Subject: Re: Not able to connect to postgresql database
  In-Reply-To: <4C057195.3010102@hogranch.com>
  References: <AANLkTinBl2QsPy0vCg0gN1fzy96ttltXpK0TVGqeiRlU@mail.gmail.com> <4C0526EB0200002500031C7D@gw.wicourts.gov> <4C057195.3010102@hogranch.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox