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

yuqi1129 pushed a commit to branch branch-1.3
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/branch-1.3 by this push:
     new cd2aac02ae [Cherry-pick to branch-1.3] [#10508] 
fix(client-java-runtime): Exclude JDBC utils from shadow JAR to prevent 
NoClassDefFoundError (#11324) (#11330)
cd2aac02ae is described below

commit cd2aac02ae9b18b246395273331dbf77045d47c9
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Jun 2 11:52:48 2026 +0800

    [Cherry-pick to branch-1.3] [#10508] fix(client-java-runtime): Exclude JDBC 
utils from shadow JAR to prevent NoClassDefFoundError (#11324) (#11330)
    
    **Cherry-pick Information:**
    - Original commit: 568121e90cb46c7b599ebe2d172df0e9c3fd021b
    - Target branch: `branch-1.3`
    - Status: ✅ Clean cherry-pick (no conflicts)
    
    Co-authored-by: Jerry Shao <[email protected]>
    Co-authored-by: Claude Sonnet 4.6 <[email protected]>
---
 .gitignore                                   | 2 ++
 clients/client-java-runtime/build.gradle.kts | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/.gitignore b/.gitignore
index e085208f9f..036f1b3e67 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,6 +30,8 @@ replay_pid*
 !.idea/vcs.xml
 **/.vscode
 **/build
+# Zed editor's Java language server (Eclipse JDT) compiles classes into bin/ 
for code intelligence
+**/bin
 gen
 **/.DS_Store
 **/*.iml
diff --git a/clients/client-java-runtime/build.gradle.kts 
b/clients/client-java-runtime/build.gradle.kts
index 01ca47724e..514f34e4e3 100644
--- a/clients/client-java-runtime/build.gradle.kts
+++ b/clients/client-java-runtime/build.gradle.kts
@@ -41,6 +41,14 @@ tasks.withType<ShadowJar>(ShadowJar::class.java) {
   configurations = listOf(project.configurations.runtimeClasspath.get())
   archiveClassifier.set("")
 
+  // Exclude server-side JDBC pooling utilities. These classes reference 
commons-dbcp2 which is
+  // declared compileOnly in :common and therefore never bundled here. 
Including them produces a
+  // broken relocated reference (BasicDataSource renamed to the shaded 
package, but the actual
+  // shaded class absent). Connector runtime JARs placed on Spark/Flink/Hadoop 
classpaths would
+  // then shadow the working copy in gravitino-jobs.jar via parent-first class 
delegation, causing
+  // NoClassDefFoundError at runtime. See 
https://github.com/apache/gravitino/issues/10508
+  exclude("org/apache/gravitino/utils/jdbc/**")
+
   // Relocate dependencies to avoid conflicts
   relocate("com.google", "org.apache.gravitino.shaded.com.google")
   relocate("com.fasterxml", "org.apache.gravitino.shaded.com.fasterxml")

Reply via email to