Re: Exception Error - Please help I've tried everything!

From: "Andrew Lazarus" <drlaz(at)attglobal(dot)net>
To: "Greg Peters" <gregpeters79(at)gmail(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Exception Error - Please help I've tried everything!
Date: 2006-11-27 04:35:08
Message-ID: op.tjnq0uq9ftslme@andyxp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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(at)gmail(dot)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(at)attglobal(dot)net

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Greg Peters 2006-11-27 08:43:24 Re: Exception Error - Please help I've tried everything!
Previous Message Reuben Pasquini 2006-11-27 00:04:23 Re: Exception Error - Please help I've tried everything!