SEZ9 commented on issue #11510: URL: https://github.com/apache/seatunnel/issues/11510#issuecomment-5140925612
Follow-up with a root-cause fix proposal, after tracing how the jar enters the image. **Where it comes from**: the conflicting jar is copied into the global `lib/` by the CI/Docker assembly only — [`seatunnel-dist/src/main/assembly/assembly-bin-ci.xml#L211`](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/src/main/assembly/assembly-bin-ci.xml#L211) includes `org.opengauss:opengauss-jdbc:jar` in the same dependencySet that ships `org.postgresql:postgresql:jar`. Both jars contain `org.postgresql.Driver` (openGauss's driver is a pgJDBC fork that keeps the original package names), so classpath order decides which one wins — and when the openGauss copy wins, every real PostgreSQL connection fails with `Protocol error. Session setup failed` (PG14+, scram-sha-256). **Two facts that make the fix low-risk**: 1. The release tarball assembly (`assembly-bin.xml`) does **not** include `opengauss-jdbc` at all — this line exists only in the CI assembly used for the Docker image. So tarball users already live without this jar in `lib/`; only image users get the conflicting extra. 2. `connector-cdc-opengauss-2.3.13.jar` already bundles the driver classes itself (verified by jar scan — it is one of the three jars on the image containing `org/postgresql/core/v3/ConnectionFactoryImpl`). Removing the standalone jar from `lib/` does not break the openGauss CDC connector. **Proposed fix**: remove the `<include>org.opengauss:opengauss-jdbc:jar</include>` line from `assembly-bin-ci.xml`, aligning the image with the release tarball. Trade-off: image users of the generic `Jdbc` connector against openGauss would need to drop the driver into `lib/` manually — exactly what tarball users do today, and what the docs already describe for other drivers. Alternative (heavier): shade/relocate the `org.postgresql` packages inside the openGauss jar, which avoids the manual step but adds a relocation build to maintain. Happy to submit the one-line assembly PR (plus a note in the Docker docs) if the maintainers prefer the removal approach — please confirm the direction. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
