Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 4C7199FB36C for ; Thu, 7 Jun 2007 05:28:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 09383-09 for ; Thu, 7 Jun 2007 05:27:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from webmail.imtech.res.in (unknown [59.160.112.41]) by postgresql.org (Postfix) with ESMTP id AD5AB9FB28B for ; Thu, 7 Jun 2007 05:27:54 -0300 (ADT) Received: from webmail.imtech.res.in (localhost [127.0.0.1] (may be forged)) by webmail.imtech.res.in (8.13.1/8.13.1) with ESMTP id l578LtZg031639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 7 Jun 2007 13:51:55 +0530 Received: (from apache@localhost) by webmail.imtech.res.in (8.13.1/8.13.1/Submit) id l578LsxT031637; Thu, 7 Jun 2007 13:51:54 +0530 From: Mamoon Rashid X-Authentication-Warning: webmail.imtech.res.in: apache set sender to mamoon@imtech.res.in using -f Received: from 59.160.112.41 (proxying for 172.141.127.57) (SquirrelMail authenticated user mamoon) by imtech.res.in with HTTP; Thu, 7 Jun 2007 13:51:54 +0530 (IST) Message-ID: <46984.59.160.112.41.1181204514.squirrel@imtech.res.in> Date: Thu, 7 Jun 2007 13:51:54 +0530 (IST) Subject: Failed to load jdbc driver To: pgsql-jdbc@postgresql.org User-Agent: SquirrelMail/1.4.6-7.el4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.245 tagged_above=0 required=5 tests=AWL=-0.066, BAYES_50=0.001, FORGED_RCVD_HELO=0.135, NORMAL_HTTP_TO_IP=0.175 X-Spam-Level: X-Archive-Number: 200706/20 X-Sequence-Number: 17082 hi all, background Info- 1.OS: EL4 linux 2. postgresql 8.2.4 3. postgresql-8.2-505.jdbc4.jar 4. JDK1.6 5. Apache2.0.59 6. PHP as cgi processor When i try to execute my JDBC program through browser the error in the httpd error_log file look like- [Thu Jun 07 13:28:35 2007] [error] [client 127.0.0.1] Failed to load driver., referer: http://127.0.0.1/search.html [Thu Jun 07 13:28:35 2007] [error] [client 127.0.0.1] , referer: http://127.0.0.1/search.html Although i am able to execute this from terminal.The following are the syntax to load the driver and connect to the database server in JDBC progm- String sDriver = "org.postgresql.Driver"; String sURL = "jdbc:postgresql://127.0.0.1:5432/infodb"; //instead of 127.0.0.1 , [::1] also works String sUSER = "nobody";//user of the database String sPASSWD = ""; try //try to load the jdbc driver { Class.forName ("org.postgresql.Driver"); } catch (Exception e)//error { System.err.println("Failed to load driver."); return; }//end catch try //try to connect to database server { con = DriverManager.getConnection (sURL, sUSER, sPASSWD); stmt = con.createStatement(); } catch (Exception e) { System.err.println ("Problem connecting to" + sURL + ":"); System.err.println (e.getMessage()); if(con != null){ try{con.close();} catch(Exception e2){}; } return; }//catch ends The Host based authentication (pg_hba.config) of the database are as follows - # TYPE DATABASE USER CIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: host all all 127.0.0.1/32 trust # IPv6 local connections: host all all ::1/128 trust ****************************************************** can anyone suggest where i m missing. Really urgent.i hope the info i hv given is sufficient.