Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 099D2475F25 for ; Fri, 8 Nov 2002 09:05:47 -0500 (EST) Received: from checkforte.com.br (unknown [200.207.207.251]) by postgresql.org (Postfix) with ESMTP id B2B71475EBB for ; Fri, 8 Nov 2002 09:05:45 -0500 (EST) Received: from localhost.localdomain (kelly.ckf [192.168.0.11]) by checkforte.com.br (Postfix) with ESMTP id 0508DC3C8D; Fri, 8 Nov 2002 12:06:13 -0200 (BRST) Subject: Re: JDBC driver problem ? From: Daniel Serodio To: Alex Dovlecel Cc: PostgreSQL JDBC List In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.5 Date: 08 Nov 2002 12:04:39 -0200 Message-Id: <1036764282.24409.23.camel@kelly> Mime-Version: 1.0 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/81 X-Sequence-Number: 5378 The "FATAL 1" message comes from the backend (server), so this means you're able to connect to it at the network level, so it must be running with -i. It's probably a problem in the authentication setup of the server. (pg_hba.conf). I don't know which types of authentication the driver supports, but we use "trust" for our internal network: host all 192.168.0.0 255.255.0.0 trust On Fri, 2002-11-08 at 11:34, Alex Dovlecel wrote: > Hello to all, > This is my first question, so don't be mad if it is gonna be a silly one. > > I have a psql account on a psql server that runs psql 7.2.1. I want to > connect to it by using java (jdbc). > > I downloaded the JDBC 2.0 driver (pgjdbc2.jar) and I am doing the following: > > System.out.println(" + Loading the driver" ); > Class.forName( "org.postgresql.Driver" ) ; > > System.out.println(" + Creating a connection " ); > con = DriverManager.getConnection( > "jdbc:postgresql://myserver:5432/Test", > "myaccount", > "mypasswd" ) ; > > Loading the driver works. But can't obtain a connection due to: > > Exception: Something unusual has occured to cause the driver to fail. Please > report this exception: Exception: java.sql.SQLException: FATAL 1: Password > authentication failed for user "dovle" > > Stack Trace: > > java.sql.SQLException: FATAL 1: Password authentication failed for user > "myaccount" > > at org.postgresql.Connection.openConnection(Connection.java:178) > at org.postgresql.Driver.connect(Driver.java:149) > at java.sql.DriverManager.getConnection(DriverManager.java:512) > at java.sql.DriverManager.getConnection(DriverManager.java:171) > at Main.main(Main.java:18) > End of Stack Trace > > > But the password is correct!!! > > What could be wrong ? > > What should happen if the postgres does not run with the -i parameter ? Could > this be the wrong thing that happened ? > > dovle > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html -- []'s Daniel Serodio