X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 385C5528AD for ; Thu, 16 Jun 2005 07:12:39 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 03333-01 for ; Thu, 16 Jun 2005 10:12:37 +0000 (GMT) Received: from gatekeeper.yes2etl.com (unknown [202.88.179.103]) by svr1.postgresql.org (Postfix) with ESMTP id A1CD65283C for ; Thu, 16 Jun 2005 07:12:35 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by gatekeeper.yes2etl.com (8.12.10/8.12.10) with ESMTP id j5IIU7eW005891; Sun, 19 Jun 2005 00:00:12 +0530 Received: from gatekeeper.yes2etl.com ([127.0.0.1]) by localhost (gatekeeper [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 05467-04; Sun, 19 Jun 2005 00:00:07 +0530 (IST) Received: from mtracks.yes2etl.com (yes2etl.com [10.1.2.53]) by gatekeeper.yes2etl.com (8.12.10/8.12.10) with ESMTP id j5IITWCt005665; Sat, 18 Jun 2005 23:59:33 +0530 Received: from localhost (localhost [127.0.0.1]) by mtracks.yes2etl.com (8.12.10/8.12.10) with ESMTP id j5GA9MwW007606; Thu, 16 Jun 2005 15:39:22 +0530 Received: from mtracks.yes2etl.com ([127.0.0.1]) by localhost (mtracks [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04611-02; Thu, 16 Jun 2005 15:39:22 +0530 (IST) Received: from yes2etl.com (pc-31.yes2etl.com [10.1.2.31]) by mtracks.yes2etl.com (8.12.10/8.12.10) with ESMTP id j5GA9405007575; Thu, 16 Jun 2005 15:39:05 +0530 Message-ID: <42B15261.7050503@yes2etl.com> Date: Thu, 16 Jun 2005 15:50:17 +0530 From: Minal Reply-To: minalac@yes2etl.com Organization: E-Convergence Technologies Limited User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dave Cramer Cc: List Subject: Re: Postgresql-JDBC connectivity References: <42B1205E.8060904@yes2etl.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at @@NET_SUBDOMAIN@@.yes2etl.com X-Virus-Scanned: by amavisd-new at @@NET_SUBDOMAIN@@.@@NET_DOMAIN@@ X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200506/84 X-Sequence-Number: 13046 I set the classpath, copied in the lib folder of web-inf. If I try to run a simple java program shown below: import java.sql.*; public class Example1 { public static void main(String[] argv) { System.out.println("Checking if Driver is registerd"); try { Class.forName("org.postgresql.Driver"); } catch(ClassNotFoundException cnfe) { System.out.println("Couldn't find the Driver"); cnfe.printStackTrace(); System.exit(1); } System.out.println("registered the Driver OK, so lets make a connection"); Connection c = null; try { c= DriverManager.getConnection("jdbc:postgresql://localhost/trainneedcorp","postgres","admin"); } catch(SQLException se) { System.out.println("Couldnt connect"); se.printStackTrace(); System.exit(1); } if(c != null) System.out.println("WE CONNECTED"); else System.out.println("Reaching here is not done"); } } I get the following error: java.lang.ClassNotFoundException: org.postgresql.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:199) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at Example1.main(Example1.java:10) Dave Cramer wrote: > Hi, > > How are you trying to connect, what is the error message, > specifically which lib directory of jakarta did you copy it into? > > Dave > On 16-Jun-05, at 2:46 AM, Minal wrote: > >> Hi... >> I am novice user of Postgresql8.0.3. I managed to export the >> database from sql server. We have all our application in JSP. I want >> to install the org.postgresql.driver.. >> I completed the following steps... >> 1.Downloaded the jar file from http://jdbc.postgres.org >> 2. Copied it in the lib folder of Jakarta.. >> 3. Edited the pages to use the Driver..am still not able to connect... >> >> Where am I going wrong?? >> Minalac >> >> ---------------------------(end of >> broadcast)--------------------------- >> TIP 5: Have you checked our extensive FAQ? >> >> http://www.postgresql.org/docs/faq >> >> > >