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

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


The following commit(s) were added to refs/heads/main by this push:
     new e674d8a61 ORC-1371: Remove unsupported SLF4J bindings from classpath
e674d8a61 is described below

commit e674d8a61d77d0e477c5251f5091b07e1c3c1d3e
Author: Stamatis Zampetakis <[email protected]>
AuthorDate: Fri Feb 10 18:42:07 2023 -0800

    ORC-1371: Remove unsupported SLF4J bindings from classpath
    
    ### What changes were proposed in this pull request?
    * Exclude `slf4j-log4j12` from Hadoop dependencies
    * Exclude `logback-classic` from Zookeeper
    
    ### Why are the changes needed?
    Running `./mvnw clean install` shows a lot of warnings of the following 
form:
    ```
    SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions 
1.7.x or earlier.
    SLF4J: Ignoring binding found at 
[jar:file:/home/stamatis/.m2/repository/org/slf4j/slf4j-log4j12/1.7.10/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Ignoring binding found at 
[jar:file:/home/stamatis/.m2/repository/ch/qos/logback/logback-classic/1.2.10/logback-classic-1.2.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: See https://www.slf4j.org/codes.html#ignoredBindings for an 
explanation.
    ```
    
    The problem is that slf4j-log4j12-1.7.10.jar and logback-classic-1.2.10.jar 
are in the classpath but are incompatible with the current version of slf4j-api 
that ORC uses.
    
    ### How was this patch tested?
    `./mvnw clean install 2>&1 | grep "Class path contains SLF4J bindings" | wc 
-l`
    
    Before: 74
    After: 0
    
    Closes #1403 from zabetak/slf4j-illegal-bindings.
    
    Authored-by: Stamatis Zampetakis <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 java/mapreduce/pom.xml |  1 -
 java/pom.xml           | 24 ++++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/java/mapreduce/pom.xml b/java/mapreduce/pom.xml
index 5f3a0db8f..47eeca1a6 100644
--- a/java/mapreduce/pom.xml
+++ b/java/mapreduce/pom.xml
@@ -69,7 +69,6 @@
     <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
-      <version>${min.hadoop.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
diff --git a/java/pom.xml b/java/pom.xml
index 58952c6d2..bab3327bd 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -227,6 +227,10 @@
             <groupId>tomcat</groupId>
             <artifactId>jasper-runtime</artifactId>
           </exclusion>
+          <exclusion>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+          </exclusion>
         </exclusions>
       </dependency>
       <dependency>
@@ -315,6 +319,22 @@
             <groupId>org.apache.avro</groupId>
             <artifactId>avro</artifactId>
           </exclusion>
+          <exclusion>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+          </exclusion>
+        </exclusions>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.hadoop</groupId>
+        <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
+        <version>${min.hadoop.version}</version>
+        <scope>test</scope>
+        <exclusions>
+          <exclusion>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+          </exclusion>
         </exclusions>
       </dependency>
       <dependency>
@@ -342,6 +362,10 @@
             <groupId>io.netty</groupId>
             <artifactId>netty-transport-native-epoll</artifactId>
           </exclusion>
+          <exclusion>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+          </exclusion>
         </exclusions>
       </dependency>
       <dependency>

Reply via email to