CLASS EXCEPTION org.postgresql.Driver

From: "Folorunsho, Abayomi" <afolorunsho(at)cenbank(dot)org>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: CLASS EXCEPTION org.postgresql.Driver
Date: 2006-07-13 10:14:49
Message-ID: 30C61690D24519478F42E1A8CDA2E2777A2EE8@Mailserver3.cenbank.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I just installed PostgreSQL 8.1.4.1 and created a dbase named HotelDB. I
created tables using the dos (psql) prompt and very successful. The
above exception came up when I tried to connect my application using
JDBC:

Try{

Class.forName("org.postgresql.Driver").newInstance();

System.out.println("Class Found");

}

catch(ClassNotFoundException ey){System.out.println("CLASS EXCEPTION " +
ey.getMessage());}

catch(InstantiationException ey){System.out.println("INSTANCE EXCEPTION
" + ey.getMessage());}

catch(IllegalAccessException ey){System.out.println("ACCESS EXCEPTION "
+ ey.getMessage());}

As advised, I copied postgresql-8.1-405.jdbc3.jar from C:\Program
Files\PostgreSQL\8.1\jdbc to my class path and the name of the file
included in my environment variable definition:

classpath\postgresql-8.1-405.jdbc3.jar;

when this did not work, I added the whole jdbc folder to my class path:
C:\Program Files\PostgreSQL\8.1\jdbc

Since this did not work either I got this zip file
'postgresql-8.1-405.jdbc3' and unzip it in my class path and included
this path in my environment variables. Still no solution.

Another question, I could not find the folder containing the newly
created db(HotelDB) neither the database itself, though, as stated
earlier I can work on it using the psql and the pgAdmin.

Please help

email: afolorunsho(at)cenbank(dot)org <mailto:afolorunsho(at)cenbank(dot)org>

afolorunsho(at)gmail(dot)com

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and or privileged material. Any review, retransmission, dissemination or other use or any action taken in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you receive this mail in error, please contact the sender and delete the material from your Computer system.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Ricardo Vaz Mannrich 2006-07-13 13:50:41 PostgreSQL array vs. JDBC vs. Hibernate
Previous Message Oliver Jowett 2006-07-12 22:14:14 Re: how to monitor the amount of bytes fetched in a executeQuery()