Skip to content

fix(webflux): fix NoSuchMethodError when using spring framework 7 wit…#4514

Closed
jihadbou15 wants to merge 1 commit into
elastic:mainfrom
jihadbou15:fix/spring-webflux-7-support
Closed

fix(webflux): fix NoSuchMethodError when using spring framework 7 wit…#4514
jihadbou15 wants to merge 1 commit into
elastic:mainfrom
jihadbou15:fix/spring-webflux-7-support

Conversation

@jihadbou15

Copy link
Copy Markdown

…h webflux

What does this PR do?

This PR fixes an issue with the experimental support for Spring framework 7 that was added PR. When running the agent, it will throw a NoSuchMethodError exception due to the HttpHeaders.entrySet method. This is due to HttpHeaders no longer implementing the MultiValueMap contract.
I have changed the copying of header to only use API's that are still available across version 5, 6 and 7.
The test co.elastic.apm.agent.springwebflux.AbstractServerInstrumentationTest#dispatchHello covers this fix.

Checklist

  • This is an enhancement of existing features, or a new feature in existing plugins
    • I have updated CHANGELOG.next-release.md
    • I have added tests that prove my fix is effective or that my feature works
    • Added an API method or config option? Document in which version this will be introduced
    • I have made corresponding changes to the documentation
  • This is a bugfix
  • This is a new plugin
    • I have updated CHANGELOG.next-release.md
    • My code follows the style guidelines of this project
    • I have made corresponding changes to the documentation
    • I have added tests that prove my fix is effective or that my feature works
    • New and existing unit tests pass locally with my changes
    • I have updated supported-technologies.md
    • Added an API method or config option? Document in which version this will be introduced
    • Added an instrumentation plugin? Describe how you made sure that old, non-supported versions are not instrumented by accident.
  • This is something else

@jihadbou15 jihadbou15 requested a review from a team as a code owner June 17, 2026 08:05
@cla-checker-service

cla-checker-service Bot commented Jun 17, 2026

Copy link
Copy Markdown

❌ Author of the following commits did not sign a Contributor Agreement:
440014c

Please, read and sign the above mentioned agreement if you want to contribute to this project

@github-actions

Copy link
Copy Markdown

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@github-actions github-actions Bot added agent-java community Issues and PRs created by the community triage labels Jun 17, 2026
@jihadbou15 jihadbou15 force-pushed the fix/spring-webflux-7-support branch from 33f996d to 440014c Compare June 17, 2026 08:07
@jihadbou15

Copy link
Copy Markdown
Author

Will remake the PR as i committed with the wrong account.

@jihadbou15 jihadbou15 closed this Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-java community Issues and PRs created by the community triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants