Skip to content

42.4.1 JDK18 GSS compat getCurrentSubject WrongMethodTypeException #2588

@Rob4001

Description

@Rob4001

Please read https://stackoverflow.com/help/minimal-reproducible-example

Describe the issue
New compatibility reflection released as part of 42.4.1 breaks for pre JDK18 versions due to a casting error #2535

MakeGSS.java line 104-106

Driver Version?
42.4.1
Java Version?
11
OS Version?
Windows Server 2016
PostgreSQL Version?
CRDB 21.1.13
To Reproduce
Steps to reproduce the behaviour:

  1. Setup JDBC connection using JAAS, and com.sun.security.auth.module.Krb5LoginModule true
  2. Attempt connection to database

Expected behaviour
Should connect to DB using GSSAPI Auth

Throws exception

org.postgresql.util.PSQLException :GSS Authentication failed
at org.postgresql.gss.MakeGSS.authenticate (MakeGSS.java:173
Caused by: java.lang.invoke.WrongMethodTypeException: expected ()Access control context but found ()Object

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions