Skip to content

Use waffle-jna 3.2.0 #2690

@chrullrich

Description

@chrullrich

I'm submitting a ...

  • bug report
  • feature request

Describe the issue
As previously discussed in #2668, there is a compatibility problem when using pgjdbc in JetBrains DataGrip with SSPI authentication (i.e. from a Windows client to a database server offering either SSPI or GSS-API authentication).

(For DataGrip, read "every one of the dozen or so members of JetBrains' IDE family"; they are all IDEA with slightly different default features.)

The immediate problem was fixed on 30 November when JetBrains changed the configuration of their IDE to no longer force the incompatible JNA 5.12.0 into pgjdbc's class path. On 1 December they then released the latest version of DataGrip, 2022.3, which is far more thoroughly incompatible because it uses JNA internally and cannot load the older version of JNA that waffle-jna 1.9.1 brings in.

I would like to request that pgjdbc move its waffle-jna dependency from version 1.9.1 to 3.2.0. This version uses JNA 5.12.1, the same version that DataGrip includes. This resolves the new compatibility issue.

I am aware that pgjdbc is not responsible for catering to choices made by a third party, however, if would really make my day :-).

The changes required to get a successful connection appear to be minimal (see https://github.com/chrullrich/pgjdbc/tree/waffle-jna-3.2.0). The only code change I had to make was using JNA's SspiUtil.ManagedSecBufferDesc class (added in JNA 5.0.0) instead of Sspi.SecBufferDesc. However, I cannot make any promises about the reliability of the result; all I know is that the connection works and I can load data into the IDE from my particular database. I will of course be happy to assist with any testing necessary if you can tell me what to do.

Driver Version?
42.5.2

Java Version?
11

PostgreSQL Version?
15.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions