Re: Connect via odbc from Windows to Linux
От | Bruce Hyatt |
---|---|
Тема | Re: Connect via odbc from Windows to Linux |
Дата | |
Msg-id | 264210.40241.qm@web34405.mail.mud.yahoo.com обсуждение исходный текст |
Ответ на | Re: Connect via odbc from Windows to Linux (Oliver Jowett <oliver@opencloud.com>) |
Ответы |
Re: Connect via odbc from Windows to Linux
|
Список | pgsql-jdbc |
--- On Mon, 12/1/08, Oliver Jowett <oliver@opencloud.com> wrote: > Bruce Hyatt wrote: > > --- On Mon, 12/1/08, Oliver Jowett > <oliver@opencloud.com> wrote: > > > >> Bruce Hyatt wrote: > >> > >>> This is what I tried initially and it returns: > >>> SQL Error: java.sql.SQLException: No suitable > driver > >> found for jdbc:postgresql://host/database 0 08001 > >> > >> Have you followed the instructions here? > >> > >> > http://jdbc.postgresql.org/documentation/head/load.html > >> > >> -O > > > > I had commented out that line because the Java SE 6 > API documentation for class DriverManager says it's no > longer necessary but when I add it back in I get: > > You commented out what line? > > > Error: java.lang.ClassNotFoundException: > org.postgresql.Driverorg.postgresql.Driver > > You have the wrong classname. I had commented out: Class.forName("org.postgresql.Driver"); I see that the classname is wrong. It seems the application is appending the classname to itself for some reason. The applicationis simple - only 27 lines total and three lines apply to the connection. The relevant lines are: String data = "jdbc:postgresql://192.168.1.199/platingshop"; // I tried hostname/... and hostname.domain/platingshop too try { // call to Class.forName no longer necessary Class.forName("org.postgresql.Driver"); Connection conn = DriverManager.getConnection( data, "", ""); Bruce Hyatt
В списке pgsql-jdbc по дате отправления: