Re: Connection Problem with JDBC - Mailing list pgsql-jdbc

From Nick Fankhauser
Subject Re: Connection Problem with JDBC
Date
Msg-id NEBBLAAHGLEEPCGOBHDGCEEFEFAA.nickf@ontko.com
Whole thread Raw
In response to Re: Connection Problem with JDBC  ("Steven Murphy" <stevenmurphy@hotmail.com>)
List pgsql-jdbc
> The command I am using to run the program is
> java -Djdbc.drivers=org.postgresql.Driver ConnectDemo
> jdbc:postgresql:javatest postgres ' '

I think if it was a classpath problem, you'd be getting a
"ClassNotFoundException" I believe the "No Suitable Driver" indicates that
among the drivers you have loaded, none matches the database url passed to
DriverManager.getConnection. ...But the command & url above look just fine &
I can't see any opportunity in your program for the url to get mangled.

Have you tried loading the drivers using Class.forName in main? I'm not sure
what it would tell us if it worked, but if it didn't work that way, I think
I'd download the driver again.

-Nick

--------------------------------------------------------------------------
Nick Fankhauser  nickf@ontko.com  Phone 1.765.935.4283  Fax 1.765.962.9788
Ray Ontko & Co.     Software Consulting Services     http://www.ontko.com/



pgsql-jdbc by date:

Previous
From: "Steven Murphy"
Date:
Subject: Re: Connection Problem with JDBC
Next
From: john-paul delaney
Date:
Subject: newb: Howto tell if jdbc is compiled-in?