Skip to content

fix: detect incompatible Jackson version at startup#24009

Open
Artur- wants to merge 4 commits intomainfrom
detect-spring-boot-4.0.3
Open

fix: detect incompatible Jackson version at startup#24009
Artur- wants to merge 4 commits intomainfrom
detect-spring-boot-4.0.3

Conversation

@Artur-
Copy link
Member

@Artur- Artur- commented Mar 25, 2026

Vaadin requires Jackson 3.1+ but Spring Boot 4.0.3 and earlier ship Jackson 3.0 which has incompatible API changes. This caused a cryptic NoSuchMethodError at runtime. Adding an early check in VaadinService.init() surfaces a clear error message with remediation steps instead.

Vaadin requires Jackson 3.1+ but Spring Boot 4.0.3 and earlier ship
Jackson 3.0 which has incompatible API changes. This caused a cryptic
NoSuchMethodError at runtime. Adding an early check in
VaadinService.init() surfaces a clear error message with remediation
steps instead.
@github-actions
Copy link

github-actions bot commented Mar 25, 2026

Test Results

 1 386 files  ±0   1 386 suites  ±0   1h 29m 9s ⏱️ + 1m 29s
 9 920 tests +1   9 849 ✅ +1  71 💤 ±0  0 ❌ ±0 
10 393 runs  +1  10 313 ✅ +1  80 💤 ±0  0 ❌ ±0 

Results for commit 2528af0. ± Comparison against base commit 0d03ea1.

♻️ This comment has been updated with latest results.

@github-actions github-actions bot added +0.0.1 and removed +1.0.0 labels Mar 26, 2026
Comment on lines +109 to +115
"The Jackson version on the classpath (" + jacksonVersion
+ ") is not compatible with this version of Vaadin."
+ " This version of Vaadin requires Jackson 3.1+."
+ " Please upgrade your Jackson dependencies."
+ " Note that Spring Boot 4.0.3 and earlier include"
+ " Jackson 3.0; upgrading to Spring Boot 4.0.4 or"
+ " later resolves this.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

One more though about the message. Basically, we are telling users to update Jackson to 3.1.
However, it might be the case that the project is using Jackson 2 and there is actually no need to migrate to 3.1. The fix is to bump to a Jackson 2 version with a compatible jackson-annotation dependency.

For example, Quarkus does not support Jackson 3, but it depends on the latest Jackson 2 version, compatible Jackson 3.1

Copy link
Collaborator

Choose a reason for hiding this comment

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

Another potential example is JEE containers like Wildfly, that might ship an older Jackson version that leaks into the application classpath.
In the release notes we already have some hints on how to deal with this, but the proposed message could be misleading.

Copy link
Member Author

@Artur- Artur- Mar 26, 2026

Choose a reason for hiding this comment

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

Would this new version work better?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm a bit picky. but the issue is not only about having Jackson 3.0 instead of 3.1.
The problem can still happen if the project uses Jackson 2.19 for its own purposes. This might also cause failures, depending on how transitive dependencies are resolved. In that case the fix would be to bump Jackson 2 to 2.21.x.

We should maybe also add something like: "If you have Jackson 2, update it to version 2.21 or later"

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants