CAMEL-23213: Handle Spring Boot catalog provider requiring JDK 21+#22087
Merged
CAMEL-23213: Handle Spring Boot catalog provider requiring JDK 21+#22087
Conversation
CatalogLoader now catches UnsupportedClassVersionError when loading SpringBootRuntimeProvider and provides a clear error message suggesting to use --camel-spring-boot-version=4.18.x for JDK 17 compatibility. Tests skip Spring Boot runtime type on JDK < 21 since camel-spring-boot 4.19+ requires Spring Boot 4 (JDK 21). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
Contributor
|
🧪 CI tested the following changed modules:
Full reactor (26 modules)
|
oscerd
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CatalogLoader.loadSpringBootCatalog()now catchesUnsupportedClassVersionErrorwhen loadingSpringBootRuntimeProviderand provides a clear error message: "Spring Boot runtime requires JDK 21+ starting from camel-spring-boot 4.19.0. Use --camel-spring-boot-version=4.18.x for JDK 17 compatibility, or run on JDK 21+."ExportTest,ExportMainApplicationProperties,DependencyListTest,DependencyUpdateTest) skip Spring Boot runtime type on JDK < 21Context
camel-spring-boot4.19.0-SNAPSHOT moved to Spring Boot 4 (JDK 21). Thecamel-catalog-provider-springbootartifact is now compiled with Java 21 bytecode (class file version 65.0), causingUnsupportedClassVersionErroron JDK 17. This brokecamel jbang export --runtime=spring-booton JDK 17 and caused CI failures on JDK 17 for any PR whose incremental build pulled incamel-jbang-core.Note: reverting the
camel-spring-bootcatalog to compile with JDK 17 would not help, since Spring Boot 4 itself requires JDK 21 — users on JDK 17 cannot run Spring Boot 4 applications anyway. The right approach is to guide them to use--camel-spring-boot-version=4.18.x(which targets Spring Boot 3.x / JDK 17) or upgrade to JDK 21+.Test plan