Fwd: BUG #17216: No Password Provided Error - uncaught exception

From: Cliff Sizer <cliffsizer(at)gmail(dot)com>
To: pgsql-jdbc(at)lists(dot)postgresql(dot)org
Subject: Fwd: BUG #17216: No Password Provided Error - uncaught exception
Date: 2021-10-07 05:37:42
Message-ID: CAHsP=4_aCd13LMCgZnaeN_+3BxkM9etU5HZ3=t5UV36h73cHkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-jdbc

Driver version: 42.2.24
PostgreSQL version: Debian 14.0-1.pgdg110+1
Operating system: x86_64-pc-linux-gnu

When connecting to the pg database 14.0 and no password (empty) is
specified the following error message is returned
"Something unusual has occurred to cause the driver to fail. Please
report this exception. Empty value for ‘password’ "

In previous versions of the database (13.4) the password specific error
message is returned "The server requested password-based authentication,
but no password was provided"

Previous versions of the driver (42.2.*) exhibit the same behaviour when
connecting to version 14. The password specific exception is expected
rather than the generic message.

jdbc:postgresql://{host}[:{port}]/[{database}]?user=myuser&password=

Stack Trace:
Caused by: org.postgresql.util.PSQLException: Something unusual has
occurred to cause the driver to fail. Please report this exception.
at org.postgresql.Driver$ConnectThread.getResult(Driver.java:420)
at org.postgresql.Driver.connect(Driver.java:271)
at
org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:55)
at
org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:355)
at
org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:115)
at
org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:665)
... 86 common frames omitted
Caused by: java.lang.AssertionError: Misuse of castNonNull: called with a
null argument
at org.postgresql.util.internal.Nullness.castNonNull(Nullness.java:22)
at
org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:759)
at
org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:161)
at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:213)
at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:51)
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:225)
at org.postgresql.Driver.makeConnection(Driver.java:465)
at org.postgresql.Driver.access$100(Driver.java:62)
at org.postgresql.Driver$ConnectThread.run(Driver.java:375)
... 1 common frames omitted

Kind regards,
Cliff

---------- Forwarded message ---------
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Date: Wed, Oct 6, 2021 at 7:01 PM
Subject: Re: BUG #17216: No Password Provided Error - uncaught exception
To: Cliff Sizer <cliffsizer(at)gmail(dot)com>

Cliff Sizer <cliffsizer(at)gmail(dot)com> writes:
> Yes, 42.2.24 is the latest available driver.

Hmm, I'm sure they have added SCRAM support, so that theory seems
out. Perhaps you should file a ticket with the JDBC crew.
(pgsql-bugs only deals with bugs in the core server.)

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message hpc researcher_mspk 2021-10-08 05:57:04 Re: BUG #17214: HammerDB-v4.2-TPCH build schema error for virtual users.
Previous Message Peter Geoghegan 2021-10-07 01:03:11 Re: BUG #17212: pg_amcheck fails on checking temporary relations

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2021-10-07 15:20:47 [pgjdbc/pgjdbc] c4c35d: Revert "try to read any notifies or errors that co...
Previous Message Dave Cramer 2021-10-06 17:11:46 [pgjdbc/pgjdbc] c9c64b: fix spacing on GSS_ENC_MODE (#2280)