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

roryqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git


The following commit(s) were added to refs/heads/master by this push:
     new 95537cd21 [#2030] fix(client-spark): Remove javax and logging from 
relocation list to solve NoClassDefFoundError (#2029)
95537cd21 is described below

commit 95537cd21cb02f3bddd256bbe311a05d68726f29
Author: maobaolong <[email protected]>
AuthorDate: Fri Sep 20 11:37:29 2024 +0800

    [#2030] fix(client-spark): Remove javax and logging from relocation list to 
solve NoClassDefFoundError (#2029)
    
    ### What changes were proposed in this pull request?
    
    Do not relocate javax to avoid NoClassDefFoundError issue.
    
    ### Why are the changes needed?
    
    
    Fix: #2030
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Thanks for the verify check by @zhengchenyu . This is not reproduced on my 
env.
---
 client-spark/spark2-shaded/pom.xml | 19 +++++++------------
 client-spark/spark3-shaded/pom.xml | 19 +++++++------------
 2 files changed, 14 insertions(+), 24 deletions(-)

diff --git a/client-spark/spark2-shaded/pom.xml 
b/client-spark/spark2-shaded/pom.xml
index 50a37dd05..703318a27 100644
--- a/client-spark/spark2-shaded/pom.xml
+++ b/client-spark/spark2-shaded/pom.xml
@@ -112,6 +112,8 @@
                     <exclude>META-INF/*.DSA</exclude>
                     <exclude>META-INF/*.RSA</exclude>
                     <exclude>**/*.proto</exclude>
+                    <exclude>**/*.css</exclude>
+                    <exclude>**/*.html</exclude>
                   </excludes>
                 </filter>
               </filters>
@@ -156,8 +158,10 @@
                   <pattern>org.apache</pattern>
                   
<shadedPattern>${rss.shade.packageName}.org.apache</shadedPattern>
                   <excludes>
+                    <!-- Exclude the provided dependencies -->
                     <!-- Exclude the packages belonging to uniffle -->
                     <exclude>org/apache/uniffle/**/*</exclude>
+                    <!-- Exclude the packages belonging to hadoop -->
                     <exclude>org/apache/hadoop/*</exclude>
                     <exclude>org/apache/hadoop/**/*</exclude>
                     <!-- Exclude the logging packages-->
@@ -166,10 +170,13 @@
                     <exclude>org/apache/commons/logging/**/*</exclude>
                     <exclude>org/apache/log4j/*</exclude>
                     <exclude>org/apache/log4j/**/*</exclude>
+                    <exclude>org/apache/logging/**/*</exclude>
                     <!-- Exclude spark packages -->
                     <exclude>org/apache/spark/**/*</exclude>
                     <!-- Exclude commons-io packages -->
                     <exclude>org/apache/commons/io/**/*</exclude>
+                    <!-- Exclude the packages belonging to collections 3 -->
+                    <exclude>org/apache/commons/collections/**/*</exclude>
                   </excludes>
                 </relocation>
                 <relocation>
@@ -180,18 +187,6 @@
                   <pattern>android.annotation</pattern>
                   
<shadedPattern>${rss.shade.packageName}.android.annotation</shadedPattern>
                 </relocation>
-                <relocation>
-                  <pattern>javax</pattern>
-                  <shadedPattern>${rss.shade.packageName}.javax</shadedPattern>
-                  <includes>
-                    <include>javax/annotation/**/*</include>
-                    <include>javax/activation/**/*</include>
-                    <include>javax/xml/**/*</include>
-                    <include>javax/inject/**/*</include>
-                    <include>javax/validation/**/*</include>
-                    <include>javax/servlet/**/*</include>
-                  </includes>
-                </relocation>
                 <relocation>
                   <pattern>javassist</pattern>
                   
<shadedPattern>${rss.shade.packageName}.javassist</shadedPattern>
diff --git a/client-spark/spark3-shaded/pom.xml 
b/client-spark/spark3-shaded/pom.xml
index f0b16eb0d..0312632ae 100644
--- a/client-spark/spark3-shaded/pom.xml
+++ b/client-spark/spark3-shaded/pom.xml
@@ -112,6 +112,8 @@
                     <exclude>META-INF/*.DSA</exclude>
                     <exclude>META-INF/*.RSA</exclude>
                     <exclude>**/*.proto</exclude>
+                    <exclude>**/*.css</exclude>
+                    <exclude>**/*.html</exclude>
                   </excludes>
                 </filter>
               </filters>
@@ -156,8 +158,10 @@
                   <pattern>org.apache</pattern>
                   
<shadedPattern>${rss.shade.packageName}.org.apache</shadedPattern>
                   <excludes>
+                    <!-- Exclude the provided dependencies -->
                     <!-- Exclude the packages belonging to uniffle -->
                     <exclude>org/apache/uniffle/**/*</exclude>
+                    <!-- Exclude the packages belonging to hadoop -->
                     <exclude>org/apache/hadoop/*</exclude>
                     <exclude>org/apache/hadoop/**/*</exclude>
                     <!-- Exclude the logging packages-->
@@ -166,10 +170,13 @@
                     <exclude>org/apache/commons/logging/**/*</exclude>
                     <exclude>org/apache/log4j/*</exclude>
                     <exclude>org/apache/log4j/**/*</exclude>
+                    <exclude>org/apache/logging/**/*</exclude>
                     <!-- Exclude spark packages -->
                     <exclude>org/apache/spark/**/*</exclude>
                     <!-- Exclude commons-io packages -->
                     <exclude>org/apache/commons/io/**/*</exclude>
+                    <!-- Exclude the packages belonging to collections 3 -->
+                    <exclude>org/apache/commons/collections/**/*</exclude>
                   </excludes>
                 </relocation>
                 <relocation>
@@ -180,18 +187,6 @@
                   <pattern>android.annotation</pattern>
                   
<shadedPattern>${rss.shade.packageName}.android.annotation</shadedPattern>
                 </relocation>
-                <relocation>
-                  <pattern>javax</pattern>
-                  <shadedPattern>${rss.shade.packageName}.javax</shadedPattern>
-                  <includes>
-                    <include>javax/annotation/**/*</include>
-                    <include>javax/activation/**/*</include>
-                    <include>javax/xml/**/*</include>
-                    <include>javax/inject/**/*</include>
-                    <include>javax/validation/**/*</include>
-                    <include>javax/servlet/**/*</include>
-                  </includes>
-                </relocation>
                 <relocation>
                   <pattern>javassist</pattern>
                   
<shadedPattern>${rss.shade.packageName}.javassist</shadedPattern>

Reply via email to