Re: Connection Problem with JDBC

Поиск
Список
Период
Сортировка
От Nick Fankhauser
Тема Re: Connection Problem with JDBC
Дата
Msg-id NEBBLAAHGLEEPCGOBHDGCEEFEFAA.nickf@ontko.com
обсуждение исходный текст
Ответ на Re: Connection Problem with JDBC  ("Steven Murphy" <stevenmurphy@hotmail.com>)
Список 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 по дате отправления:

Предыдущее
От: "Steven Murphy"
Дата:
Сообщение: Re: Connection Problem with JDBC
Следующее
От: john-paul delaney
Дата:
Сообщение: newb: Howto tell if jdbc is compiled-in?