Skip to content

Remove legacy log4j-1.2 dependencies completely #132238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
: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 v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants