Using Postgres version 15.2 and PostgreSQL JDBC Driver 42.2.14.
Authentication to the Postgres database works for two other nearly identical environments using our same application but in one environment only we are getting a missing class error that mentions an ongres library: Caused by: java.lang.NoClassDefFoundError: com/ongres/scram/common/stringprep/StringPreparation
All environments are using the same JDBC URL and options. The only mention of "ongres" with "postgres" that I've found is that the Postgres JDBC starting with driver 42.2.0 added support for encryption that uses Ongres: "Support SCRAM-SHA-256 for PostgreSQL 10 in the JDBC 4.2 version (Java 8+) using the Ongres SCRAM library. PR 842"
It is highly annoying that I should have to add a completely new untested ongres jar into my environment for unknown reasons to get rid of this weird error. We're not using encryption SHA-256 internally nor with any encryption of passwords. We're not hitting a plain old missing jar file as the other two environments do not require an additional library to authenticate to the same database.
Does anyone know what causes a JDBC authentication call to Postgres to fall into this ongres stringprep call? What else is ongres used for that might be getting triggered?
I've tried using the exact version of Postgres and JDBC driver in a simple test environment and everything works fine there. Trying to determine what complications/options might be triggering this ongres class access.