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

voonhous pushed a commit to tag rfc-105-pre-cleanup
in repository https://gitbox.apache.org/repos/asf/hudi.git

commit b4f82bf7327b473fef4f622c882991ad9edcf01d
Author: voon <[email protected]>
AuthorDate: Wed May 27 01:37:41 2026 +0800

    fix(trino): exclude log4j-slf4j-impl from trino-filesystem-manager
    
    trino-filesystem-manager pulls trino-filesystem-alluxio ->
    alluxio-core-common -> log4j-slf4j-impl. airlift log-manager already
    brings log4j-to-slf4j. Log4j throws
    
      LoggingException: log4j-slf4j-impl cannot be present with log4j-to-slf4j
    
    during its static init when both bridges are on the classpath. That
    makes log4j's clinit fail, which cascades: every class with a logger
    field (avro SchemaBuilder, parquet Types$PrimitiveBuilder, jetty
    SslContextFactory$Client, hudi FSUtils, testcontainers MountableFile and
    DockerClientFactory, etc.) reports
    
      NoClassDefFoundError: Could not initialize class <X>
    
    at the first call site -- 20 of the 93 surefire tests in the run.
    
    Excluding log4j-slf4j-impl from trino-filesystem-manager keeps the
    airlift log-manager bridge as the single log4j route and unblocks the
    test JVM.
---
 hudi-trino-plugin/pom.xml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/hudi-trino-plugin/pom.xml b/hudi-trino-plugin/pom.xml
index 8581146761b0..76864f3e80ea 100644
--- a/hudi-trino-plugin/pom.xml
+++ b/hudi-trino-plugin/pom.xml
@@ -175,6 +175,15 @@
         <dependency>
             <groupId>io.trino</groupId>
             <artifactId>trino-filesystem-manager</artifactId>
+            <exclusions>
+                <!-- alluxio-core-common pulls log4j-slf4j-impl; airlift 
log-manager pulls
+                     log4j-to-slf4j. Log4j refuses to start with both bridges 
present and the
+                     resulting clinit failure cascades through every class 
with a logger. -->
+                <exclusion>
+                    <groupId>org.apache.logging.log4j</groupId>
+                    <artifactId>log4j-slf4j-impl</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
 
         <dependency>

Reply via email to