jdk1.4.1 Password authentication failed for user. md5 support?

From: Aditya <aditya(at)grot(dot)org>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: jdk1.4.1 Password authentication failed for user. md5 support?
Date: 2002-08-03 17:50:07
Message-ID: losn1vsugg.fsf@mighty.grot.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On a Solaris8 machine, with pgjdbc2.jar (downloaded yesterday from
jdbc.postgresql.org) I can get a simple test program to work fine with
a 1.2.2 JDK:

some:aditya~> /usr/java1.2/jre/bin/java -version
java version "1.2.2"
Solaris VM (build Solaris_JDK_1.2.2_05a, native threads, sunwjit)

however, running the exact same program with 1.4.1-beta:

some:aditya~> /usr/j2se/jre/bin/java -version
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b14)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b14, mixed mode)

produces the following error (I'm using md5 passwords on the postgresql server):

Could not connect to db: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 "jndi"

Stack Trace:

java.sql.SQLException: FATAL 1: Password authentication failed for user "jndi"

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 jdbcTest.main(jdbcTest.java:18)
End of Stack Trace

Exception in thread "main" java.lang.NullPointerException
at jdbcTest.main(jdbcTest.java:25)

and line 25 is indicated with a "==>" in the code fragment below:

Connection db = null;
try {
db = DriverManager.getConnection(url, username, password);
} catch (java.sql.SQLException e){
System.out.println("Could not connect to db:" + e.toString());
}

Statement st = null;
try {
==> st = db.createStatement();
} catch (java.sql.SQLException e){
System.out.println("Could not prepare statement:" + e.toString());
}

Looking through the archives, this doesn't seem to be a known problem.

Hints appreciated,
Thanks,
Adi

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Aditya 2002-08-03 21:53:58 Re: jdk1.4.1 Password authentication failed for user. md5 support?
Previous Message Drew Wilson 2002-08-03 15:31:35 Re: JDBC2 compilation errors w/ top-of-tree CVS (Darwin)