This is an automated email from the ASF dual-hosted git repository.
joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
The following commit(s) were added to refs/heads/master by this push:
new d09c50249 IMPALA-13049: Add dependency management for log4j2 to use
2.18.0
d09c50249 is described below
commit d09c5024907aaf387aaa584dc86cb2b4d641a582
Author: Joe McDonnell <[email protected]>
AuthorDate: Mon Apr 29 14:55:15 2024 -0700
IMPALA-13049: Add dependency management for log4j2 to use 2.18.0
Currently, there is no dependency management for the log4j2
version. Impala itself doesn't use log4j2. However, recently
we encountered a case where one dependency brought in
log4-core 2.18.0 and another brought in log4j-api 2.17.1.
log4j-core 2.18.0 relies on the existence of the ServiceLoaderUtil
class from log4j-api 2.18.0. log4j-api 2.17.1 doesn't have this
class, which causes class not found exceptions.
This uses dependency management to set the log4j2 version to 2.18.0
for log4j-core and log4j-api to avoid any mismatch.
Testing:
- Ran a local build and verified that both log4j-core and log4j-api
are using 2.18.0.
Change-Id: Ib4f8485adadb90f66f354a5dedca29992c6d4e6f
Reviewed-on: http://gerrit.cloudera.org:8080/21379
Reviewed-by: Michael Smith <[email protected]>
Reviewed-by: Abhishek Rawat <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
bin/impala-config.sh | 1 +
java/pom.xml | 12 ++++++++++++
2 files changed, 13 insertions(+)
diff --git a/bin/impala-config.sh b/bin/impala-config.sh
index de5737909..bdcacb8a5 100755
--- a/bin/impala-config.sh
+++ b/bin/impala-config.sh
@@ -288,6 +288,7 @@ export IMPALA_JACKSON_DATABIND_VERSION=2.15.3
export IMPALA_JSON_SMART_VERSION=2.4.11
export IMPALA_JUNIT_VERSION=4.12
export IMPALA_KITE_VERSION=1.1.0
+export IMPALA_LOG4J2_VERSION=2.18.0
export IMPALA_ORC_JAVA_VERSION=1.7.6
export IMPALA_PAC4J_VERSION=4.5.5
export IMPALA_RELOAD4j_VERSION=1.2.22
diff --git a/java/pom.xml b/java/pom.xml
index 9e4697e58..bc5f193dc 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -80,6 +80,7 @@ under the License.
<springframework.version>${env.IMPALA_SPRINGFRAMEWORK_VERSION}</springframework.version>
<json-smart.version>${env.IMPALA_JSON_SMART_VERSION}</json-smart.version>
<commons-dbcp2.version>${env.IMPALA_DBCP2_VERSION}</commons-dbcp2.version>
+ <log4j2.version>${env.IMPALA_LOG4J2_VERSION}</log4j2.version>
</properties>
<repositories>
@@ -376,6 +377,17 @@ under the License.
<artifactId>jackson-annotations</artifactId>
<version>${jackson-databind.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ <version>${log4j2.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j2.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>