Skip site navigation (1) Skip section navigation (2)

Re: org.postgresql.Driver

From: "Announce" <truthhurts(at)insightbb(dot)com>
To: Bernardo López <bernardolg(at)gmail(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: org.postgresql.Driver
Date: 2005-11-18 15:17:14
Message-ID: KBEKKNMFLELKGIADDEPEEENACCAA.truthhurts@insightbb.com (view raw or flat)
Thread:
Lists: pgsql-novice
Ok. If I'm understanding you correctly then your JDBC .jars ARE NOT in the
CLASSPATH then.
The fact that your java.class.path output looks so different from what you
sent in the initial email means that you are executing that Connect program
in a completely different environment or under a different user.

Perhaps you are running this application in an IDE (such as Eclipse) or on a
servlet (probably not because of the MAIN method you are using)? This would
explain the difference in CLASSPATH output. How ARE you determining what
your CLASSPATH is? Are you using any tools, IDEs to run this program?

You should see a fully qualified path to all of the postgresql-*jdbc*.jar
files you included, not just the DIRECTORY they exist in.  For example:

C:\UNIV 2005-1\Labs\Lab 20051018;
C:\Archivos de programa\PostgreSQL\8.0\jdbc\;
C:\Archivos de programa\Java\jdk1.5.0_04\jre\lib\rt.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\lib\dt.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\lib\tools.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\jre\lib\ext\dnsns.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\jre\lib\ext\localedata.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\jre\lib\ext\sunjce_provider.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\jre\lib\ext\sunpkcs11.jar

Is not going to work because you've only specified the DIRECTORY and not the
full FILE PATH that includes the '.jar' name.

But:

.;C:\UNIV 2005-1\Labs\Lab 20051018;
C:\Archivos de programa\PostgreSQL\8.0\jdbc\postgresql-8.0-311.jdbc2.jar;
C:\Archivos de programa\PostgreSQL\8.0\jdbc\postgresql-8.0-311.jdbc2ee.jar;
C:\Archivos de programa\PostgreSQL\8.0\jdbc\postgresql-8.0-311.jdbc3.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\jre\lib\rt.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\lib\dt.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\lib\tools.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\jre\lib\ext\dnsns.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\jre\lib\ext\localedata.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\jre\lib\ext\sunjce_provider.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\jre\lib\ext\sunpkcs11.jar

Should work because you provided the full file spec. There should be no line
breaks or spaces next to the semi colons (;).  Also note that I included
".;" and the JDBC .jars at the BEGINNING of the CLASSPATH.

-Aaron

-----Original Message-----
From: pgsql-novice-owner(at)postgresql(dot)org
[mailto:pgsql-novice-owner(at)postgresql(dot)org]On Behalf Of Bernardo López
Sent: Thursday, November 17, 2005 10:46 PM
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] org.postgresql.Driver


Thanks for the prompt answer Aaron!
Unfortunately it's still not working :S
The System.getProperty("java.class.path") returns the folder the file
is in and other folders:

C:\UNIV 2005-1\Labs\Lab 20051018;
C:\Archivos de programa\Java\jdk1.5.0_04\jre\lib\rt.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\lib\dt.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\lib\tools.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\jre\lib\ext\dnsns.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\jre\lib\ext\localedata.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\jre\lib\ext\sunjce_provider.jar;
C:\Archivos de programa\Java\jdk1.5.0_04\jre\lib\ext\sunpkcs11.jar

Also set the PATH and others without the " marks.
I'll take a look to the FAQ page.
I'll keep trying.

Thanks for all!, and keep posting!

ßernardo L.


In response to

Responses

pgsql-novice by date

Next:From: dawizzDate: 2005-11-18 16:51:25
Subject: Conversion between BpChar and "C" char
Previous:From: William YuDate: 2005-11-18 13:08:13
Subject: Re: Application using PostgreSQL (off topic,

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group