JinwooHwang commented on code in PR #7940:
URL: https://github.com/apache/geode/pull/7940#discussion_r2442517914
##########
build.gradle:
##########
@@ -58,7 +58,30 @@ allprojects {
repositories {
mavenCentral()
- maven { url "https://repo.spring.io/release" }
+ maven {
+ url "https://jakarta.oss.sonatype.org/content/repositories/releases/"
+ name "Jakarta EE Releases"
+ }
+ }
+
+ // CRITICAL: Fix for Log4j/SLF4J circular binding conflict introduced during
Jakarta/Spring Boot 3.x migration
+ //
+ // Root Cause:
+ // - Geode uses Log4j Core directly and includes 'log4j-slf4j-impl' (routes
SLF4J calls → Log4j)
+ // - Spring Boot 3.x includes 'spring-boot-starter-logging' which brings in
'log4j-to-slf4j' (routes Log4j calls → SLF4J)
+ // - Having BOTH creates a circular binding: SLF4J → Log4j → SLF4J
+ //
+ // Symptoms:
+ // - ClassCastException: org.apache.logging.slf4j.SLF4JLogger cannot be cast
to org.apache.logging.log4j.core.Logger
+ // - ClassCastException: org.apache.logging.slf4j.SLF4JLoggerContext cannot
be cast to org.apache.logging.log4j.core.LoggerContext
+ // - Occurs in Log4jLoggingProvider.getRootLoggerContext() when
LogManager.getRootLogger() returns SLF4J logger instead of Log4j logger
+ //
+ // Solution:
+ // Exclude 'log4j-to-slf4j' globally. Geode's logging architecture requires
Log4j Core to be the primary logging implementation,
+ // with SLF4J calls being routed TO Log4j (via log4j-slf4j-impl), not the
other way around.
+ //
+ configurations.all {
+ exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j'
Review Comment:
Thank you for your encouragement, @sboorlagadda .
--
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]