Skip to content

CXF-9116: Remove org.apache.cxf.feature.LoggingFeature#2807

Merged
reta merged 1 commit intoapache:mainfrom
reta:CXF-9116
Jan 18, 2026
Merged

CXF-9116: Remove org.apache.cxf.feature.LoggingFeature#2807
reta merged 1 commit intoapache:mainfrom
reta:CXF-9116

Conversation

@reta
Copy link
Member

@reta reta commented Dec 28, 2025

Remove org.apache.cxf.feature.LoggingFeature. It has been deprecated for a long time and should be removed, the replacement exists.

  • removed <logging> namespace handler in cxf-core (since logging feature is not part of core anymore): replacement is <bean class="org.apache.cxf.ext.logging.LoggingFeature"/> along with
     <dependency>
           <groupId>org.apache.cxf</groupId>
           <artifactId>cxf-rt-features-logging</artifactId>
           <version>4.2.0</version>
       </dependency>

@reta reta force-pushed the CXF-9116 branch 11 times, most recently from d1fe633 to a76b407 Compare December 29, 2025 14:05
@reta reta requested review from coheigea and ffang December 29, 2025 15:50
@reta
Copy link
Member Author

reta commented Dec 29, 2025

@coheigea @ffang would appreciate a look folks, getting rid of some long standing deprecations, thank you


SecurityContext httpSecurityContext = new SecurityContext() {
final HttpServletRequest reqFromInMessage = (HttpServletRequest)exchange.getInMessage().get(HTTP_REQUEST);
final SecurityContext httpSecurityContext = new SecurityContext() {
Copy link
Member Author

Choose a reason for hiding this comment

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

@ffang some refactoring here: a number of cxf-*-security tests were failing due to logging change: apparently when DefaultLogEventMapper is called, the underlying HTTP request is already recycled and fails with NPE (jetty/jetty.project#12080). To mitigate that, at least for getUserPrincipal() - capturing principal early.

Copy link
Contributor

@rzo1 rzo1 Feb 17, 2026

Choose a reason for hiding this comment

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

@reta I think, that this change lead to some issues in TomEE. Some details are here: https://lists.apache.org/thread/bfxq109lwqzht7x8hlrjgltogh79t9sh (due to caching the principal early instead of evaluating it on demand (after some processing has happened). For us in TomEE, it leads to some downstream issues in the MicroProfile JWT TCK.

Copy link
Member Author

@reta reta Feb 17, 2026

Choose a reason for hiding this comment

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

Thank you @rzo1 , I suspected some issues here (but still hoped we won't hit them), I will be looking into other options shortly.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for having a look!

Copy link
Member Author

Choose a reason for hiding this comment

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

#2890 - would love to hear the feedback, thank you

@reta reta merged commit 6e29579 into apache:main Jan 18, 2026
9 of 10 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.

3 participants

Comments