Skip to content

CAMEL-23213: Handle Spring Boot catalog provider requiring JDK 21+#22087

Merged
gnodet merged 1 commit intomainfrom
CAMEL-23213
Mar 19, 2026
Merged

CAMEL-23213: Handle Spring Boot catalog provider requiring JDK 21+#22087
gnodet merged 1 commit intomainfrom
CAMEL-23213

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Mar 18, 2026

Summary

  • CatalogLoader.loadSpringBootCatalog() now catches UnsupportedClassVersionError when loading SpringBootRuntimeProvider and 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+."
  • Tests (ExportTest, ExportMainApplicationProperties, DependencyListTest, DependencyUpdateTest) skip Spring Boot runtime type on JDK < 21

Context

camel-spring-boot 4.19.0-SNAPSHOT moved to Spring Boot 4 (JDK 21). The camel-catalog-provider-springboot artifact is now compiled with Java 21 bytecode (class file version 65.0), causing UnsupportedClassVersionError on JDK 17. This broke camel jbang export --runtime=spring-boot on JDK 17 and caused CI failures on JDK 17 for any PR whose incremental build pulled in camel-jbang-core.

Note: reverting the camel-spring-boot catalog 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

  • All 75 tests pass on JDK 21+ (Spring Boot tests included)
  • CI validates JDK 17 no longer fails (Spring Boot tests skipped)

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>
@github-actions
Copy link
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions github-actions bot added the dsl label Mar 18, 2026
@github-actions
Copy link
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-jbang-core
Full reactor (26 modules)
  • Camel :: Coverage
  • Camel :: Coverage [pom]
  • Camel :: JBang :: Core
  • Camel :: JBang :: Core [jar]
  • Camel :: JBang :: Integration tests
  • Camel :: JBang :: Integration tests [jar]
  • Camel :: JBang :: MCP
  • Camel :: JBang :: MCP [jar]
  • Camel :: JBang :: Main
  • Camel :: JBang :: Main [jar]
  • Camel :: JBang :: Plugin :: Edit
  • Camel :: JBang :: Plugin :: Edit [jar]
  • Camel :: JBang :: Plugin :: Generate
  • Camel :: JBang :: Plugin :: Generate [jar]
  • Camel :: JBang :: Plugin :: Kubernetes
  • Camel :: JBang :: Plugin :: Kubernetes [jar]
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: Route Parser [jar]
  • Camel :: JBang :: Plugin :: Testing
  • Camel :: JBang :: Plugin :: Testing [jar]
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: JBang :: Plugin :: Validate [jar]
  • Camel :: Launcher
  • Camel :: Launcher [jar]
  • Camel :: Launcher :: Container
  • Camel :: Launcher :: Container [pom]

@gnodet gnodet merged commit 555c74b into main Mar 19, 2026
5 checks passed
@gnodet gnodet deleted the CAMEL-23213 branch March 20, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants