Skip to content

Conversation

Rassyan
Copy link
Contributor

@Rassyan Rassyan commented Jul 31, 2025

Problem Analysis

After upgrading to Log4j 2.25.1 in #132166, the module dependency requires org.apache.log4j (from Log4j 1.2 era) causes boot failure:
java.lang.module.FindException: Module org.apache.log4j not found, required by org.elasticsearch.security

This legacy dependency has no actual code references in the codebase (verified by full-text search). Retaining it would:

  1. Block Log4j 2.x upgrade progress
  2. Introduce unnecessary compatibility risks

Solution

Completely remove the obsolete dependency declaration from:
x-pack/plugin/security/src/main/java/module-info.java

Validation

  • ✅ Zero references to org.apache.log4j in codebase
  • ✅ Compiled & started successfully with both:

Critical Note

This is a prerequisite for #132166. Merging this first will unblock the Log4j upgrade.

@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v9.2.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Jul 31, 2025
@dakrone dakrone added :Core/Infra/Logging Log management and logging utilities and removed needs:triage Requires assignment of a team area label labels Jul 31, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Jul 31, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rjernst rjernst self-assigned this Jul 31, 2025
@rjernst
Copy link
Member

rjernst commented Jul 31, 2025

@elasticmachine test this please

@mosche
Copy link
Contributor

mosche commented Sep 1, 2025

@elasticmachine test this please

@mosche mosche added auto-backport Automatically create backport pull requests when merged v9.1.4 v9.0.7 v8.18.7 v8.19.4 labels Sep 1, 2025
@mosche mosche merged commit e4ae587 into elastic:main Sep 1, 2025
34 checks passed
rjernst pushed a commit to rjernst/elasticsearch that referenced this pull request Sep 1, 2025
rjernst pushed a commit to rjernst/elasticsearch that referenced this pull request Sep 1, 2025
rjernst pushed a commit to rjernst/elasticsearch that referenced this pull request Sep 1, 2025
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.1
9.0
8.18
8.19

rjernst pushed a commit to rjernst/elasticsearch that referenced this pull request Sep 1, 2025
elasticsearchmachine pushed a commit that referenced this pull request Sep 2, 2025
sarog pushed a commit to portsbuild/elasticsearch that referenced this pull request Sep 11, 2025
sarog pushed a commit to portsbuild/elasticsearch that referenced this pull request Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :Core/Infra/Logging Log management and logging utilities external-contributor Pull request authored by a developer outside the Elasticsearch team >non-issue Team:Core/Infra Meta label for core/infra team v8.18.7 v8.19.4 v9.0.7 v9.1.4 v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants