Received: from mail.retep.org.uk ([216.126.85.184]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0N97Q043851 for ; Tue, 23 Jan 2001 04:07:27 -0500 (EST) (envelope-from peter@retep.org.uk) Received: (from nobody@localhost) by mail.retep.org.uk (8.11.1/8.11.1) id f0N94xa43687; Tue, 23 Jan 2001 04:04:59 -0500 (EST) (envelope-from peter@retep.org.uk) X-Authentication-Warning: mail.retep.org.uk: nobody set sender to peter@retep.org.uk using -f To: Jeff Duffy Subject: Re: Error in Programmer's Guide: JDBC Message-ID: <980240676.3a6d4924a2faf@webmail.retep.org.uk> Date: Tue, 23 Jan 2001 04:04:36 -0500 (EST) From: Peter T Mount Cc: pgsql-docs@postgresql.org References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP IMAP webmail program 2.2.3 X-Archive-Number: 200101/79 X-Sequence-Number: 214 Hmmm, it seems this has already been done (at least before the begining of last week). Peter Quoting Jeff Duffy : > 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 > > > -- Peter Mount peter@retep.org.uk PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/ RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/