You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by mc...@apache.org on 2026/10/09 16:08:36 UTC

(hop) branch main updated: Issue #8755 : Keep the PostgreSQL driver off the shared classpath (#8828)

This is an automated email from the ASF dual-hosted git repository.

mattcasters pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/main by this push:
     new b1267c1e25 Issue #8755 : Keep the PostgreSQL driver off the shared classpath (#8828)
b1267c1e25 is described below

commit b1267c1e25700d05c5b51458a4a2f212abe4be9e
Author: Matt Casters <ma...@gmail.com>
AuthorDate: Fri Oct 9 18:08:30 2026 +0200

    Issue #8755 : Keep the PostgreSQL driver off the shared classpath (#8828)
    
    The Beam assembly copied debezium-connector-postgres and its PostgreSQL
    driver into lib/core. The integration-test client loads that folder on
    the application classpath, so DriverManager returns a PgConnection the
    database plugin cannot cast to its own PGConnection.
---
 plugins/engines/beam/pom.xml                   | 4 +++-
 plugins/engines/beam/src/assembly/assembly.xml | 9 +++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/plugins/engines/beam/pom.xml b/plugins/engines/beam/pom.xml
index dd34394acf..ef6f40d320 100644
--- a/plugins/engines/beam/pom.xml
+++ b/plugins/engines/beam/pom.xml
@@ -305,7 +305,9 @@
                 </exclusion>
             </exclusions>
         </dependency>
-        <!-- DebeziumIO provides the CDC source but not a database connector. -->
+        <!-- DebeziumIO provides the CDC source but not a database connector.
+             Packaged with its PostgreSQL driver under plugins/engines/beam/lib, not lib/core.
+             A driver on the application classpath breaks PostgreSQL Bulk Loader. -->
         <dependency>
             <groupId>io.debezium</groupId>
             <artifactId>debezium-connector-postgres</artifactId>
diff --git a/plugins/engines/beam/src/assembly/assembly.xml b/plugins/engines/beam/src/assembly/assembly.xml
index 7c4d140093..e8d0af5f38 100644
--- a/plugins/engines/beam/src/assembly/assembly.xml
+++ b/plugins/engines/beam/src/assembly/assembly.xml
@@ -91,6 +91,13 @@
                      Snowflake IO jar that loads it, off the shared lib/core classpath. -->
                 <exclude>org.apache.beam:beam-sdks-java-io-snowflake</exclude>
                 <exclude>net.snowflake:snowflake-jdbc</exclude>
+                <!-- debezium-connector-postgres pulls org.postgresql:postgresql. A copy of that
+                     driver on lib/core is loaded by the application classloader, so DriverManager
+                     returns a PgConnection the database plugin cannot cast to its own
+                     PGConnection (PostgreSQL Bulk Loader). Keep the connector and its driver in
+                     the Beam plugin classloader. -->
+                <exclude>io.debezium:debezium-connector-postgres</exclude>
+                <exclude>org.postgresql:postgresql</exclude>
             </excludes>
             <outputDirectory>lib/core</outputDirectory>
         </dependencySet>
@@ -101,6 +108,8 @@
             <includes>
                 <include>org.apache.beam:beam-sdks-java-io-snowflake:jar</include>
                 <include>net.snowflake:snowflake-jdbc:jar</include>
+                <include>io.debezium:debezium-connector-postgres:jar</include>
+                <include>org.postgresql:postgresql:jar</include>
             </includes>
             <outputDirectory>plugins/engines/beam/lib</outputDirectory>
         </dependencySet>