Error in Programmer's Guide: JDBC

Поиск
Список
Период
Сортировка
От Jeff Duffy
Тема Error in Programmer's Guide: JDBC
Дата
Msg-id Pine.LNX.4.21.0101222343240.13711-100000@cairhien.alanne.com
обсуждение исходный текст
Ответы Re: Error in Programmer's Guide: JDBC
Re: Error in Programmer's Guide: JDBC
Re: Error in Programmer's Guide: JDBC
Список pgsql-docs
Greetings,

 In the release version of the Programmer's Guide, the chapter on JDBC
(I used the one at
http://www.postgresql.org/users-lounge/docs/7.0/programmer/jdbc6424.htm
)
has an example of using the class loader to load the Postgres JDBC
driver that uses the incorrect driver class name:

Class.forName("postgresql.Driver");

 This same error is repeated in the example for loading the driver using
the command line switch:

% java -Djdbc.drivers=postgresql.Driver example.ImageViewer

 The correct driver class (at least in the latest release with the filename
jdbc7.0-1.2.jar, obtained from Peter Mount's site at
http://www.retep.org.uk/postgres/download.html) should be
org.postgresql.Driver, thus changing the docs to read

Class.forName("org.postgresql.Driver");

and

% java -Djdbc.drivers=org.postgresql.Driver example.ImageViewer

 Following the docs will cause the code to throw an exception with the
message "java.lang.NoClassDefFoundError: postgresql.Driver".

 In the future, should we submit SGML diffs?

Jeff



В списке pgsql-docs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: DOS-ish newlines are infecting our SGML files
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Error in Programmer's Guide: JDBC