JDBC driver problem ? - Mailing list pgsql-jdbc

From Alex Dovlecel
Subject JDBC driver problem ?
Date
Msg-id E18A9Gs-0007OS-00@ford.kbs.twi.tudelft.nl
Whole thread Raw
Responses Re: JDBC driver problem ?  (Daniel Serodio <daniel@checkforte.com.br>)
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: "Michael Paesold"
Date:
Subject: Re: possible memory leak??
Next
From: Dave Cramer
Date:
Subject: Re: possible memory leak??