pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: stuartwdouglas (@stuartwdouglas) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] issue #2112: Single argument version of Class.forName is used to load classes, which can cause problems with non-flat class paths
Date: Mon, 29 Mar 2021 10:34:11 +0000
Message-ID: <[email protected]> (raw)


**Describe the issue**
Some code in the driver uses `Class.forName(String)` rather than `Class.forName(String, boolean, ClassLoader)` passing in the Thread context class loader as a parameter. This can cause issues for environments where the class being loaded is not in the same ClassLoader as the driver.

**Driver Version?** 

42.2.19

**To Reproduce**

We have an issue in Quarkus here: https://github.com/quarkusio/quarkus/issues/15782

Basically the SocketFactory is loaded from the same CL as the driver, while in our environment it is availilble in the Thread context ClassLoader.

**Expected behaviour**

The class to be loaded from the Thread context CL, possibly with a fallback to  the driver CL.



view thread (8+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] issue #2112: Single argument version of Class.forName is used to load classes, which can cause problems with non-flat class paths
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox