Skip to content

Fix spring-ws test failures by adding log4j-jcl bridge#22335

Merged
Croway merged 2 commits intocamel-4.14.xfrom
fix/spring-ws-log4j-jcl-bridge
Mar 30, 2026
Merged

Fix spring-ws test failures by adding log4j-jcl bridge#22335
Croway merged 2 commits intocamel-4.14.xfrom
fix/spring-ws-log4j-jcl-bridge

Conversation

@Croway
Copy link
Copy Markdown
Contributor

@Croway Croway commented Mar 30, 2026

Summary

This PR fixes ~296 test failures in the camel-spring-ws component caused by a missing JCL-to-Log4j2 bridge dependency.

Problem

Tests were failing with:

Could not initialize class org.apache.commons.logging.LogAdapter$Log4jLog

Root Cause

  • The httpclient dependency (used in tests) brings commons-logging transitively
  • The JCL-to-Log4j2 bridge (log4j-jcl) was missing from the test classpath
  • Without this bridge, commons-logging cannot initialize when Log4j2 is the logging implementation

Solution

Added log4j-jcl as a test-scoped dependency to camel-spring-ws/pom.xml. The dependency version is already managed in the parent pom.xml, so no explicit version declaration is needed.

Testing

This fix should resolve all ~296 test failures in the spring-ws component that were occurring due to the LogAdapter initialization error.

The spring-ws component tests were failing with ~296 failures due to:
  Could not initialize class org.apache.commons.logging.LogAdapter$Log4jLog

Root cause: The httpclient dependency (used in tests) brings commons-logging
transitively, but the JCL-to-Log4j2 bridge (log4j-jcl) was missing from the
test classpath. Without this bridge, commons-logging cannot initialize when
Log4j2 is present.

This fix adds log4j-jcl as a test dependency. The version is managed in the
parent pom.xml, so no explicit version is needed.
…idge

The logger entry for MessageTracing used Log4j 1.x syntax which caused
ConfigurationException when log4j-jcl routes JCL through Log4j2 core.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Croway
Copy link
Copy Markdown
Contributor Author

Croway commented Mar 30, 2026

failure is unrelated

@Croway Croway merged commit e30ef6b into camel-4.14.x Mar 30, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants