pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Lazarus <drlaz@attglobal.net>
To: Greg Peters <gregpeters79@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Exception Error - Please help I've tried everything!
Date: Sun, 26 Nov 2006 20:35:08 -0800
Message-ID: <op.tjnq0uq9ftslme@andyxp> (raw)
In-Reply-To: <9bc001470611261521m6c8d2f6nec6cb8b6726385d8@mail.gmail.com>
References: <9bc001470611252348l5fd9f93fx2c1a0d45b2c082bb@mail.gmail.com>
	<883e44790611260746h5b75162eue52207ee6505e2a7@mail.gmail.com>
	<9bc001470611261521m6c8d2f6nec6cb8b6726385d8@mail.gmail.com>

Sorry to jump in mid-thread; I no longer read every message. But I do use NB 5.0 and 5.5 with no problem. Are you passing in -Djdbc.driver=org.postgresql.Driver to the VM? You don't in the example java -classpath etc. line below which is why it doesn't work. You can put it into the NB project by right-clicking the project in the project pane, going to "Properties", Run, and adding the -D command to the "extra parameters" text box.

I believe that in the alternative, you can do a Class.forName("org.postgresql.Driver") in your code before you start accessing the DB. The java.sql code doesn't know WHICH jdbc driver to load when you open the DB until you tell it.

On Sun, 26 Nov 2006 15:21:58 -0800, Greg Peters <gregpeters79@gmail.com> wrote:

> Chuck,
>
> Thanks for your input. I will see if adding the PG driver to the NB library
> helps when I get home from work today. However, as I mentioned, I was unable
> to get it to work from the command prompt either, even when specifically
> providing a classpath with the command:
>
> java -classpath postgresql.jar PostgresqlClient.class   (both files are in
> the same directory)
>
> I know what you mean by psql being a good platform. I have been using it the
> last few months and have been impressed. Currently all my user interfaces
> have been web based using php (i see myself a semi-expert), but I am now
> trying to break into the java scene (really just learning the basics). I am
> ultimately going to make an interactive map, with object locations stored in
> the database and a friendly gui interface - well that's the plan anyway.....
>
> Thanks again,
>
> Greg.
>



-- 
Andrew Lazarus  drlaz@attglobal.net



view thread (11+ messages)  latest in thread

Message-ID: <op.tjnq0uq9ftslme@andyxp>
Permalink:  ../op.tjnq0uq9ftslme@andyxp/
Also on:    postgresql.org/message-id/op.tjnq0uq9ftslme@andyxp

 · 

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: drlaz@attglobal.net, gregpeters79@gmail.com
  Subject: Re: Exception Error - Please help I've tried everything!
  In-Reply-To: <op.tjnq0uq9ftslme@andyxp>
  References: <9bc001470611252348l5fd9f93fx2c1a0d45b2c082bb@mail.gmail.com> <883e44790611260746h5b75162eue52207ee6505e2a7@mail.gmail.com> <9bc001470611261521m6c8d2f6nec6cb8b6726385d8@mail.gmail.com> <op.tjnq0uq9ftslme@andyxp>

* 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