pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Lior K <liork20002000@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: Can't connect to posgresql through the jdbc driver
Date: Tue, 2 Mar 2010 15:59:31 -0800 (PST)
Message-ID: <759461.26544.qm@web35603.mail.mud.yahoo.com> (raw)

Hi
I'm using postgresql 8.3 and the postgresql-8.4-701.jdbc4.jar ( a jar file which is supposed to include the jdbc driver: org.postgresql.Driver) 
I set the CLASSPATH environment variable to the correct place and ran my JAVA code which first tried to call the jdbc driver : "Class.forName("org.postgresql.Driver");"
But to no avail ("java.lang.ClassNotFoundException:
org.postgresql.Driver") . At first I thought I set the CLASSPATH wrong
(did it thorugh my .bashrc and exported) but after trying a few
variations of CLASSPATH I opened the file postgresql-8.4-701.jdbc4.jar
with the ZIP tool that came with UBUNTU.
I noticed that the jdbc driver postgresql-8.4-701.jdbc4.jar was not in that bundled jar file...
I did notice that there was another driver in there called "java.sql.Driver"
I put it in my code (just to check the CLASSPATH) : "Class.forName("java.sql.Driver");"
compiled and ran . This time it passed that line correctly (it did get stuck on the actual line that operated  the JDBC URL, but at least it showed me that my CLASSPATH was right...could
anyone tell me why org.postgresql.Driver could not be found in
postgresql-8.4-701.jdbc4.jar...? and also if there is an answer to that
, how do I make this one disappear :
java.lang.ClassNotFoundException: org.postgresql.Driver
When I try to call it....


Thanks :

Lior K.



      



view thread (5+ messages)  latest in thread

Message-ID: <759461.26544.qm@web35603.mail.mud.yahoo.com>
Permalink:  ../759461.26544.qm@web35603.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/759461.26544.qm@web35603.mail.mud.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: liork20002000@yahoo.com
  Subject: Re: Can't connect to posgresql through the jdbc driver
  In-Reply-To: <759461.26544.qm@web35603.mail.mud.yahoo.com>
  References: <759461.26544.qm@web35603.mail.mud.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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