Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 83195633FCC for ; Tue, 1 Jun 2010 17:46:35 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 96426-03 for ; Tue, 1 Jun 2010 20:46:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from hogranch.com (hogranch.com [75.101.82.47]) by mail.postgresql.org (Postfix) with ESMTP id C9CF2633F10 for ; Tue, 1 Jun 2010 17:46:27 -0300 (ADT) Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id o51KkIn11452 for ; Tue, 1 Jun 2010 13:46:18 -0700 Message-ID: <4C057195.3010102@hogranch.com> Date: Tue, 01 Jun 2010 13:46:13 -0700 From: John R Pierce User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 CC: pgsql-jdbc@postgresql.org Subject: Re: Not able to connect to postgresql database References: <4C0526EB0200002500031C7D@gw.wicourts.gov> In-Reply-To: <4C0526EB0200002500031C7D@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.511 tagged_above=-10 required=5 tests=BAYES_05=-0.5, MISSING_HEADERS=1.021, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/8 X-Sequence-Number: 20578 Kevin Grittner wrote: > Manohar Bhattarai 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.