pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
CLASS EXCEPTION org.postgresql.Driver
2+ messages / 2 participants
[nested] [flat]

* CLASS EXCEPTION org.postgresql.Driver
@ 2006-07-13 10:14 Folorunsho, Abayomi <afolorunsho@cenbank.org>
  2006-07-13 14:58 ` Re: CLASS EXCEPTION org.postgresql.Driver Markus Schaber <schabi@logix-tt.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Folorunsho, Abayomi @ 2006-07-13 10:14 UTC (permalink / raw)
  To: 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@cenbank.org <mailto:afolorunsho@cenbank.org> 

            afolorunsho@gmail.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.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: CLASS EXCEPTION org.postgresql.Driver
  2006-07-13 10:14 CLASS EXCEPTION org.postgresql.Driver Folorunsho, Abayomi <afolorunsho@cenbank.org>
@ 2006-07-13 14:58 ` Markus Schaber <schabi@logix-tt.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Markus Schaber @ 2006-07-13 14:58 UTC (permalink / raw)
  To: Folorunsho, Abayomi <afolorunsho@cenbank.org>; +Cc: pgsql-jdbc

Hi, Abayomi,

Folorunsho, Abayomi wrote:
> 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

Try giving the full path of the jar file to the -cp command line
argument to your JVM.


Alternatively, for most cases it works if you copy the jdbc.jar into the
lib/ext/ directory of your JRE/JDK.

HTH,
Markus


-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-07-13 14:58 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-07-13 10:14 CLASS EXCEPTION org.postgresql.Driver Folorunsho, Abayomi <afolorunsho@cenbank.org>
2006-07-13 14:58 ` Markus Schaber <schabi@logix-tt.com>

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