Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id B498E63260B for ; Tue, 27 Apr 2010 20:38:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 72636-05 for ; Tue, 27 Apr 2010 23:38:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pw0-f46.google.com (mail-pw0-f46.google.com [209.85.160.46]) by mail.postgresql.org (Postfix) with ESMTP id 4F2116325BE for ; Tue, 27 Apr 2010 20:38:21 -0300 (ADT) Received: by pwj9 with SMTP id 9so9940832pwj.19 for ; Tue, 27 Apr 2010 16:38:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=evbLx7siP/veJmZCKond5wRnAHBkl907hP7fpIL/xvA=; b=S0b4tM3Od/wUaQbqnfMVcbgK6OEi9yOmIVi2pFwuZII6yTFl1yfBt+HplugcMOBQdd cpvBwAhlcpuMNx9/pm7tYF8KzvjCqEK/xIVc7XYBPmzmm58borcXs5chOIRRV/7OUPtu CKVmQeXMQedcN453bmtgR9d7QLyyPD1Ogg2tI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=pTcVJG/76KJVgKeGjWyms7O82wLd/Hlgya5ES/wLgX4+HYv0sIzfGS5ixgJu/gkycm MFOgAZvCfG/Tu9aUzs5szxEiG6xBJDU6GN4q9TNXjnZtYSskF0C/eop6t64jLSEHVsh0 FMwPFdUM8oSjU6zH2oBsT/9rm1Z2O4eHASyAg= MIME-Version: 1.0 Received: by 10.142.209.12 with SMTP id h12mr3662324wfg.104.1272411498732; Tue, 27 Apr 2010 16:38:18 -0700 (PDT) Received: by 10.143.5.14 with HTTP; Tue, 27 Apr 2010 16:38:18 -0700 (PDT) Date: Tue, 27 Apr 2010 16:38:18 -0700 Message-ID: Subject: Connection problems with jdbc From: Andrew Brunette To: pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary=000e0cd32e1263deee048540631d X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.888 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201004/66 X-Sequence-Number: 20477 --000e0cd32e1263deee048540631d Content-Type: text/plain; charset=ISO-8859-1 Hi, I'm new to postgres, and am having some issues getting started. I am trying to set up a java based dataload to postgres. I've done the following things: 1) initialized postgres's db 2) created a database 'dev' 3) created a user, 'abrunette'. I created the user as a superuser. 4) created a table, 'foo', using a standard create statement 5) created a password for the user. I can log into postgres as abrunette. I created the table as abrunette, and can display it fine. I then tried to configure my loader routine to access the database, using the following code: private void preparePostGreSQLDB() throws Exception { // Using simple URL for now, will need to be updated to work with remote db server String sqlurl = "jdbc:postgresql:" + params.dbName; try { // Attempt to connect to a sql driver. Class.forName("org.postgresql.Driver"); conn = DriverManager.getConnection(sqlurl, params.dbUser.toString(), params.dbPassword.toString()); conn.setAutoCommit(true); } catch(SQLException dre) { logger.info(dre.getMessage()); throw new Exception ("Error in connecting to database using " + sqlurl); } catch(Exception io) { logger.info(io.getMessage()); throw new Exception ("Non SQL error in connecting to database using " + sqlurl); } } sqlurl ends up with the value "jdbc:postgresql:dev". The username is abrunette, and the password is correct as well. When I run this, I get the message, "FATAL: Ident authentication failed for user "abrunette"". Testing seems to indicate that this message could come from a variety of sources. Can anyone suggest what I might be doing wrong? I have experimented with different forms of the URL with no change to the results. Changing the database name doesn't change the result either, so I suspect I've got something more fundamental wrong. Any help will be greatly appreciated. Thanks. Andrew --000e0cd32e1263deee048540631d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, I'm new to postgres, and am having some issues getting started.=A0 = I am trying to set up a java based dataload to postgres.=A0 I've done t= he following things:

1) initialized postgres's db
2) created = a database 'dev'
3) created a user, 'abrunette'.=A0 I created the user as a superuse= r.
4) created a table, 'foo', using a standard create statement<= br>5) created a password for the user.

I can log into postgres as ab= runette.=A0 I created the table as abrunette, and can display it fine.=A0 <= br>
I then tried to configure my loader routine to access the database, usi= ng the following code:

private void preparePostGreSQLDB() throws Exc= eption {
=A0=A0=A0=A0=A0=A0=A0 // Using simple URL for now, will need to= be updated to work with remote db server
=A0=A0=A0=A0=A0=A0=A0 String sqlurl =3D "jdbc:postgresql:" + para= ms.dbName;
=A0=A0=A0=A0=A0=A0=A0

=A0=A0=A0=A0=A0=A0=A0 try {
= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 // Attempt to connect to a sql driver.=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Class.forName("org.postgresql.Drive= r");
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conn =3D DriverManager.getConnection(sqlu= rl, params.dbUser.toString(), params.dbPassword.toString());
=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 conn.setAutoCommit(true);
=A0=A0=A0=A0=A0=A0=A0= }
=A0=A0=A0=A0=A0=A0=A0 catch(SQLException dre) {
=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 logger.info(dre.getMessa= ge());
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 throw new Exception ("Error in conne= cting to database using " + sqlurl);
=A0=A0=A0=A0=A0=A0=A0 }
=A0= =A0=A0=A0=A0=A0=A0 catch(Exception io) {
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 logger.info(io.getMessage());
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 throw new Exception ("Non SQL error = in connecting to database using " + sqlurl);
=A0=A0=A0=A0=A0=A0=A0 = }
=A0=A0=A0 }

sqlurl ends up with the value "jdbc:postgresql= :dev".=A0 The username is abrunette, and the password is correct as we= ll.=A0

When I run this, I get the message, "FATAL: Ident authentication f= ailed for user "abrunette"".=A0 Testing seems to indicate th= at this message could come from a variety of sources.=A0 Can anyone suggest= what I might be doing wrong?

I have experimented with different forms of the URL with no change to t= he results.=A0 Changing the database name doesn't change the result eit= her, so I suspect I've got something more fundamental wrong.=A0
Any help will be greatly appreciated.=A0 Thanks.

Andrew
--000e0cd32e1263deee048540631d--