You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by vy...@apache.org on 2023/12/05 10:43:05 UTC
(logging-log4j2) branch main updated: Upgrade both JDK and JRE requirements to Java 17
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/main by this push:
new 77245ddae8 Upgrade both JDK and JRE requirements to Java 17
77245ddae8 is described below
commit 77245ddae8e9ffc2b355def5d87ce4d8b61ac819
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Tue Dec 5 11:43:01 2023 +0100
Upgrade both JDK and JRE requirements to Java 17
---
.github/workflows/build.yaml | 6 +--
.github/workflows/codeql-analysis.yaml | 2 +-
.github/workflows/merge-dependabot.yaml | 4 +-
.java-version | 2 +-
BUILDING.adoc | 2 +-
log4j-1.2-api/pom.xml | 14 +++++++
log4j-core-test/pom.xml | 21 ++++++----
.../log4j/core/net/UrlConnectionFactoryTest.java | 6 ++-
...Test.java => DatePatternConverterTestBase.java} | 45 ++++++++++------------
.../DatePatternConverterWithThreadLocalsTest.java | 31 +++++++++++++++
...atePatternConverterWithoutThreadLocalsTest.java | 28 ++++++++++++++
log4j-layout-jackson-xml/pom.xml | 14 +++++++
.../template/json/JsonTemplateLayoutTest.java | 8 +++-
log4j-osgi-test/pom.xml | 4 ++
log4j-parent/pom.xml | 6 ---
pom.xml | 9 +++--
src/changelog/.3.x.x/java_17_compiler.xml | 23 +++++++++++
src/changelog/.3.x.x/java_17_runtime.xml | 23 +++++++++++
18 files changed, 196 insertions(+), 52 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index a5cb0b9724..2492da4a55 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -40,7 +40,7 @@ jobs:
if: github.actor != 'dependabot[bot]'
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@main
with:
- java-version: 11
+ java-version: 17
site-enabled: true
deploy-snapshot:
@@ -52,7 +52,7 @@ jobs:
NEXUS_USER: ${{ secrets.NEXUS_USER }}
NEXUS_PW: ${{ secrets.NEXUS_PW }}
with:
- java-version: 11
+ java-version: 17
deploy-release:
needs: build
@@ -69,6 +69,6 @@ jobs:
permissions:
contents: write
with:
- java-version: 11
+ java-version: 17
project-id: log4j
site-enabled: true
diff --git a/.github/workflows/codeql-analysis.yaml b/.github/workflows/codeql-analysis.yaml
index 6792f262c5..c2168de737 100644
--- a/.github/workflows/codeql-analysis.yaml
+++ b/.github/workflows/codeql-analysis.yaml
@@ -32,7 +32,7 @@ jobs:
analyze:
uses: apache/logging-parent/.github/workflows/codeql-analysis-reusable.yaml@main
with:
- java-version: 11
+ java-version: 17
# Permissions required to publish Security Alerts
permissions:
actions: read
diff --git a/.github/workflows/merge-dependabot.yaml b/.github/workflows/merge-dependabot.yaml
index b4d0adc9ff..de41ba87ea 100644
--- a/.github/workflows/merge-dependabot.yaml
+++ b/.github/workflows/merge-dependabot.yaml
@@ -32,13 +32,13 @@ jobs:
if: github.repository == 'apache/logging-log4j2' && github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]'
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@main
with:
- java-version: 11
+ java-version: 17
merge-dependabot:
needs: build
uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@main
with:
- java-version: 11
+ java-version: 17
permissions:
contents: write # to push changelog commits
pull-requests: write # to close the PR
diff --git a/.java-version b/.java-version
index b4de394767..98d9bcb75a 100644
--- a/.java-version
+++ b/.java-version
@@ -1 +1 @@
-11
+17
diff --git a/BUILDING.adoc b/BUILDING.adoc
index cc2576545e..dd83c8c21d 100644
--- a/BUILDING.adoc
+++ b/BUILDING.adoc
@@ -18,7 +18,7 @@
[#requirements]
== Requirements
-* JDK 11+
+* JDK 17+
* A modern Linux, OSX, or Windows host
[#building]
diff --git a/log4j-1.2-api/pom.xml b/log4j-1.2-api/pom.xml
index 95ff919fd6..08f3077259 100644
--- a/log4j-1.2-api/pom.xml
+++ b/log4j-1.2-api/pom.xml
@@ -132,6 +132,8 @@
<build>
<plugins>
+
+ <!-- Enable Log4j plugin processing -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
@@ -145,6 +147,18 @@
</annotationProcessorPaths>
</configuration>
</plugin>
+
+ <!-- Illegal access is disabled by default in Java 16 due to JEP-396.
+ We are relaxing it for tests. -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>--add-opens java.base/java.io=ALL-UNNAMED</argLine>
+ </configuration>
+ </plugin>
+
</plugins>
</build>
+
</project>
diff --git a/log4j-core-test/pom.xml b/log4j-core-test/pom.xml
index d111d8dfbe..ec7e071ee0 100644
--- a/log4j-core-test/pom.xml
+++ b/log4j-core-test/pom.xml
@@ -276,6 +276,13 @@
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
+ <!-- JEP-335 has deprecated the built-in JavaScript engine (Nashorn) in Java 11, and JEP-372 removed it in Java 15.
+ We are adding it back for tests that use JavaScript. -->
+ <dependency>
+ <groupId>org.openjdk.nashorn</groupId>
+ <artifactId>nashorn-core</artifactId>
+ <scope>test</scope>
+ </dependency>
<!-- SLF4J tests -->
<dependency>
<groupId>org.slf4j</groupId>
@@ -313,6 +320,7 @@
<build>
<plugins>
+ <!-- Enable Log4j plugin processing -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
@@ -350,14 +358,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>
- <!--
- ~ Allow environment modification:
- ~ https://junit-pioneer.org/docs/environment-variables/#warnings-for-reflective-access
- -->
- --add-opens java.base/java.util=ALL-UNNAMED
- --add-opens java.base/java.lang=ALL-UNNAMED
- </argLine>
+ <!-- Illegal access is disabled by default in Java 16 due to JEP-396.
+ We are relaxing it for tests. -->
+ <argLine>--add-opens java.base/java.lang=ALL-UNNAMED
+ --add-opens java.base/java.net=ALL-UNNAMED
+ --add-opens java.base/java.util=ALL-UNNAMED</argLine>
<runOrder>random</runOrder>
<systemPropertyVariables>
<Web.isWebApp>false</Web.isWebApp>
diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/net/UrlConnectionFactoryTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/net/UrlConnectionFactoryTest.java
index 315aa816e4..59e8a7e517 100644
--- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/net/UrlConnectionFactoryTest.java
+++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/net/UrlConnectionFactoryTest.java
@@ -57,7 +57,10 @@ import org.eclipse.jetty.servlet.ServletHolder;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import org.junit.jupiter.api.parallel.Isolated;
+import org.junitpioneer.jupiter.RetryingTest;
/**
* Tests the UrlConnectionFactory
@@ -142,7 +145,8 @@ public class UrlConnectionFactoryTest {
}
}
- @Test
+ @RetryingTest(maxAttempts = 5, suspendForMs = 1000)
+ @DisabledOnOs(value = OS.WINDOWS, disabledReason = "Fails frequently on Windows (#2011)")
public void testNoJarFileLeak() throws Exception {
ConfigurationSourceTest.prepareJarConfigURL();
final URL url = new File("target/test-classes/jarfile.jar").toURI().toURL();
diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/DatePatternConverterTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/DatePatternConverterTestBase.java
similarity index 94%
rename from log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/DatePatternConverterTest.java
rename to log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/DatePatternConverterTestBase.java
index 5b83fea6c9..d84599d4dd 100644
--- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/DatePatternConverterTest.java
+++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/DatePatternConverterTestBase.java
@@ -16,13 +16,11 @@
*/
package org.apache.logging.log4j.core.pattern;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
import java.text.SimpleDateFormat;
-import java.util.Arrays;
import java.util.Calendar;
-import java.util.Collection;
import java.util.Date;
import java.util.TimeZone;
import org.apache.logging.log4j.core.AbstractLogEvent;
@@ -33,14 +31,11 @@ import org.apache.logging.log4j.core.time.internal.format.FixedDateFormat;
import org.apache.logging.log4j.core.time.internal.format.FixedDateFormat.FixedTimeZoneFormat;
import org.apache.logging.log4j.util.Constants;
import org.apache.logging.log4j.util.Strings;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
+import org.junit.jupiter.api.Test;
-@RunWith(Parameterized.class)
-public class DatePatternConverterTest {
+abstract class DatePatternConverterTestBase {
- private static class MyLogEvent extends AbstractLogEvent {
+ private static final class MyLogEvent extends AbstractLogEvent {
@Override
public Instant getInstant() {
@@ -82,13 +77,10 @@ public class DatePatternConverterTest {
private static final String[] ISO8601_FORMAT_OPTIONS = {ISO8601};
- @Parameterized.Parameters(name = "threadLocalEnabled={0}")
- public static Collection<Object[]> data() {
- return Arrays.asList(new Object[][] {{Boolean.TRUE}, {Boolean.FALSE}});
- }
+ private final boolean threadLocalsEnabled;
- public DatePatternConverterTest(final Boolean threadLocalEnabled) {
- Constants.setThreadLocalsEnabled(threadLocalEnabled);
+ DatePatternConverterTestBase(final boolean threadLocalsEnabled) {
+ this.threadLocalsEnabled = threadLocalsEnabled;
}
private static Date date(final int year, final int month, final int date) {
@@ -106,6 +98,11 @@ public class DatePatternConverterTest {
return seconds + "nnnnnnnnn".substring(0, precision) + remainder;
}
+ @Test
+ void testThreadLocalsConstant() {
+ assertEquals(threadLocalsEnabled, Constants.isThreadLocalsEnabled());
+ }
+
@Test
public void testFormatDateStringBuilderDefaultPattern() {
assertDatePattern(null, date(2001, 1, 1), "2001-02-01 14:15:16,123");
@@ -390,9 +387,9 @@ public class DatePatternConverterTest {
final String expected = milliBuilder.append(tz).toString();
assertEquals(
- "format = " + format + ", pattern = " + pattern + ", precisePattern = " + precisePattern,
expected,
- preciseBuilder.toString());
+ preciseBuilder.toString(),
+ "format = " + format + ", pattern = " + pattern + ", precisePattern = " + precisePattern);
// System.out.println(preciseOptions[0] + ": " + precise);
}
}
@@ -416,7 +413,7 @@ public class DatePatternConverterTest {
if (pattern.endsWith("n")
|| pattern.matches(".+n+X*")
|| pattern.matches(".+n+Z*")
- || pattern.indexOf("SSS") < 0) {
+ || !pattern.contains("SSS")) {
// ignore patterns that already have precise time formats
// ignore patterns that do not use seconds.
continue;
@@ -438,15 +435,13 @@ public class DatePatternConverterTest {
milliBuilder.length() - timeZoneFormat.getLength(), milliBuilder.length())
: Strings.EMPTY;
milliBuilder.setLength(milliBuilder.length() - truncateLen); // truncate millis
- final String expected = milliBuilder
- .append("987123456".substring(0, i))
- .append(tz)
- .toString();
+ final String expected =
+ milliBuilder.append("987123456", 0, i).append(tz).toString();
assertEquals(
- "format = " + format + ", pattern = " + pattern + ", precisePattern = " + precisePattern,
expected,
- preciseBuilder.toString());
+ preciseBuilder.toString(),
+ "format = " + format + ", pattern = " + pattern + ", precisePattern = " + precisePattern);
// System.out.println(preciseOptions[0] + ": " + precise);
}
}
diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/DatePatternConverterWithThreadLocalsTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/DatePatternConverterWithThreadLocalsTest.java
new file mode 100644
index 0000000000..e632d2785d
--- /dev/null
+++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/DatePatternConverterWithThreadLocalsTest.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.logging.log4j.core.pattern;
+
+import org.apache.logging.log4j.spi.LoggingSystemProperty;
+import org.apache.logging.log4j.test.junit.SetTestProperty;
+import org.apache.logging.log4j.test.junit.UsingTestProperties;
+
+@SetTestProperty(key = LoggingSystemProperty.Constant.WEB_IS_WEBAPP, value = "false")
+@SetTestProperty(key = LoggingSystemProperty.Constant.THREAD_LOCALS_ENABLE, value = "true")
+@UsingTestProperties
+class DatePatternConverterWithThreadLocalsTest extends DatePatternConverterTestBase {
+
+ DatePatternConverterWithThreadLocalsTest() {
+ super(true);
+ }
+}
diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/DatePatternConverterWithoutThreadLocalsTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/DatePatternConverterWithoutThreadLocalsTest.java
new file mode 100644
index 0000000000..d4d667a523
--- /dev/null
+++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/DatePatternConverterWithoutThreadLocalsTest.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.logging.log4j.core.pattern;
+
+import org.apache.logging.log4j.spi.LoggingSystemProperty;
+import org.junitpioneer.jupiter.SetSystemProperty;
+
+@SetSystemProperty(key = LoggingSystemProperty.Constant.THREAD_LOCALS_ENABLE, value = "false")
+class DatePatternConverterWithoutThreadLocalsTest extends DatePatternConverterTestBase {
+
+ DatePatternConverterWithoutThreadLocalsTest() {
+ super(false);
+ }
+}
diff --git a/log4j-layout-jackson-xml/pom.xml b/log4j-layout-jackson-xml/pom.xml
index fc6be11c8a..c212ad4644 100644
--- a/log4j-layout-jackson-xml/pom.xml
+++ b/log4j-layout-jackson-xml/pom.xml
@@ -92,6 +92,8 @@
<build>
<plugins>
+
+ <!-- Enable Log4j plugin processing -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
@@ -105,6 +107,18 @@
</annotationProcessorPaths>
</configuration>
</plugin>
+
+ <!-- Illegal access is disabled by default in Java 16 due to JEP-396.
+ We are relaxing it for tests. -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
+ </configuration>
+ </plugin>
+
</plugins>
</build>
+
</project>
diff --git a/log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/JsonTemplateLayoutTest.java b/log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/JsonTemplateLayoutTest.java
index cc138567af..20f75b4085 100644
--- a/log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/JsonTemplateLayoutTest.java
+++ b/log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/JsonTemplateLayoutTest.java
@@ -900,13 +900,19 @@ class JsonTemplateLayoutTest {
"field", "severity",
"severity", asMap("field", "code"))));
+ // `Level` can be extended at runtime and `LevelResolver` doesn't support this.
+ // JTL level-to-string caches might miss entries that user submits.
+ // Hence, we first fix a `Level` snapshot before the JTL compilation *and* checking against known levels.
+ // See #2063 for details.
+ final Level[] levels = Level.values();
+
// Create the layout.
final JsonTemplateLayout layout = JsonTemplateLayout.newBuilder()
.setConfiguration(CONFIGURATION)
.setEventTemplate(eventTemplate)
.build();
- for (final Level level : Level.values()) {
+ for (final Level level : levels) {
// Create the log event.
final SimpleMessage message = new SimpleMessage("Hello, World!");
diff --git a/log4j-osgi-test/pom.xml b/log4j-osgi-test/pom.xml
index 59747b2806..9811094553 100644
--- a/log4j-osgi-test/pom.xml
+++ b/log4j-osgi-test/pom.xml
@@ -196,9 +196,13 @@
<pax.exam.logging>false</pax.exam.logging>
<java.protocol.handler.pkgs>org.ops4j.pax.url</java.protocol.handler.pkgs>
</systemPropertyVariables>
+ <!-- Illegal access is disabled by default in Java 16 due to JEP-396.
+ We are relaxing it for tests. -->
+ <argLine>--add-opens java.base/java.net=ALL-UNNAMED</argLine>
</configuration>
</plugin>
</plugins>
</build>
+
</project>
diff --git a/log4j-parent/pom.xml b/log4j-parent/pom.xml
index 7c1b7a305d..57ca29a996 100644
--- a/log4j-parent/pom.xml
+++ b/log4j-parent/pom.xml
@@ -44,12 +44,6 @@
<!-- =================
Common properties
================= -->
- <maven.compiler.release>11</maven.compiler.release>
- <maven.compiler.source>${maven.compiler.release}</maven.compiler.source>
- <maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
-
- <!-- JDK version of the main Maven process (used in ASF parent POM) -->
- <minimalJavaBuildVersion>[11,12)</minimalJavaBuildVersion>
<!-- TODO: fix errors and reenable SpotBugs -->
<spotbugs.skip>true</spotbugs.skip>
<!-- TODO: re-enable BND Baseline -->
diff --git a/pom.xml b/pom.xml
index 1cba6b9f1b..dd0c26c380 100644
--- a/pom.xml
+++ b/pom.xml
@@ -308,10 +308,13 @@
Common properties
================= -->
<manifestfile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestfile>
- <maven.compiler.release>11</maven.compiler.release>
- <maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
+ <!-- Target Java 17 -->
+ <minimalJavaBuildVersion>[17,18)</minimalJavaBuildVersion>
+ <maven.compiler.source>17</maven.compiler.source>
+ <maven.compiler.target>17</maven.compiler.target>
+ <maven.compiler.release>17</maven.compiler.release>
<!-- JDK version of the main Maven process (used in ASF parent POM) -->
- <minimalJavaBuildVersion>[11,12)</minimalJavaBuildVersion>
+ <minimalJavaBuildVersion>[17,18)</minimalJavaBuildVersion>
<module.name />
<!-- `project.build.outputTimestamp` is required to be present for reproducible builds.
diff --git a/src/changelog/.3.x.x/java_17_compiler.xml b/src/changelog/.3.x.x/java_17_compiler.xml
new file mode 100644
index 0000000000..b2a83a6b93
--- /dev/null
+++ b/src/changelog/.3.x.x/java_17_compiler.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to you under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://logging.apache.org/log4j/changelog"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.2.xsd"
+ type="changed">
+ <description format="asciidoc">Upgraded the required compiler version to Java 17</description>
+</entry>
diff --git a/src/changelog/.3.x.x/java_17_runtime.xml b/src/changelog/.3.x.x/java_17_runtime.xml
new file mode 100644
index 0000000000..95a03166ca
--- /dev/null
+++ b/src/changelog/.3.x.x/java_17_runtime.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to you under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://logging.apache.org/log4j/changelog"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.2.xsd"
+ type="changed">
+ <description format="asciidoc">Upgraded the required runtime version to Java 17</description>
+</entry>