Message-ID: From: "stuartwdouglas (@stuartwdouglas)" To: "pgjdbc/pgjdbc" Date: Mon, 29 Mar 2021 10:34:11 +0000 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 List-Id: X-GitHub-Author-Id: 328571 X-GitHub-Author-Login: stuartwdouglas X-GitHub-Issue: 2112 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-State: closed X-GitHub-Type: issue X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/2112 Content-Type: text/plain; charset=utf-8 **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.