Received: from hermes.pressenter.com (hermes.pressenter.com [209.224.20.19]) by hub.org (8.10.1/8.10.1) with ESMTP id e7BHHGG47371 for ; Fri, 11 Aug 2000 13:17:16 -0400 (EDT) Received: from [209.224.33.106] (helo=cs.umn.edu) by hermes.pressenter.com with esmtp (Exim 2.05 #1) id 13NIQj-0000KO-00 for pgsql-interfaces@hub.org; Fri, 11 Aug 2000 12:17:14 -0500 Message-ID: <399434D7.86310F79@cs.umn.edu> Date: Fri, 11 Aug 2000 12:16:07 -0500 From: John Collins Organization: University of Minnesota X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@hub.org Subject: Using jdbc with JBuilder 3.5 References: <39940AE3.4FB354FA@enetgroup.co.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200008/79 I installed postgres 7.0.2 and the jdk1.2 version of the new jdbc driver jdbc7.0-1.2.jar in a RH Linux 6.1 system. I am able to add users, create databases, tables, etc. using the command-line tools and psql. Originally I set the access rights to local all trust host all 127.0.0.1 255.255.255.255 trust My first attempt to use the jdbc driver was through the JDBC Explorer in JBuilder 3.5. I configured the driver and the database URL, but I couldn't connect because it complained about authentication failure. I had not entered a password into postgres for the username I was using, so I tried not giving a username. That produced an exception about an empty username. So, I went back and added a password for the user, and still nothing. At this point I tried a simple example in java from the JDBC tutorial, which just opens a database and inserts a single record. That threw a password authentication exception. The next thing I tried was specifying password authentication to the JDBC connect operation, but that also failed. Finally, I went back to pg_hba.conf, and changed the "trust" settings to "password pg_pwd". I stopped and restarted the postmaster, and then I could connect, with both the JDBC Explorer and with my sample application. Unfortunately, the JDBC Explorer apparently isn't interacting correctly with the driver. Instead of my tables, what I see in the Explorer is 6 copies of "SYSTEM INDEX" and one copy of "Procedures". The 6 SYSTEM INDEX entries appear to be identical when expanded. Although the tables don't show up in the tree browser pane, if I bring up the "Enter SQL" tab, I can do queries against the database and get the correct results. I'm a bit of a newbie in this area, so I may have missed something obvious. I haven't found much documentation on the jdbc driver itself; when I go to the www.retep.org.uk site, I see one pdf file with a bit of info about the driver, and several others that appear to be about postgres itself. Any pointers would be much appreciated. Thanks in advance. John Collins University of Minnesota