[ 
https://issues.apache.org/jira/browse/CAMEL-23213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet resolved CAMEL-23213.
-------------------------------------
    Resolution: Fixed

> ExportTest fails on JDK 17 after camel-spring-boot moved to Spring Boot 4 
> (JDK 21)
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-23213
>                 URL: https://issues.apache.org/jira/browse/CAMEL-23213
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>            Priority: Major
>             Fix For: 4.19.0
>
>
> camel-spring-boot 4.19.0-SNAPSHOT moved to Spring Boot 4, which requires JDK 
> 21. The camel-catalog-provider-springboot artifact is now compiled with Java 
> 21 bytecode (class file version 65.0).
> This causes two issues:
> 1. *CI failures*: ExportTest and other tests that parameterize over 
> RuntimeType.springBoot fail on JDK 17 runners with:
> {code}
> UnsupportedClassVersionError: 
> org/apache/camel/springboot/catalog/SpringBootRuntimeProvider has been 
> compiled by a more recent version of the Java Runtime (class file version 
> 65.0), this version of the Java Runtime only recognizes class file versions 
> up to 61.0
> {code}
> This affects any PR whose incremental CI pulls in camel-jbang-core on JDK 17. 
> Confirmed on multiple PRs (CAMEL-23209, CAMEL-23212, CAMEL-23210, etc.).
> 2. *User-facing*: {{camel jbang export --runtime=spring-boot}} fails on JDK 
> 17 with an unhelpful UnsupportedClassVersionError.
> *Fix*:
> - CatalogLoader.loadSpringBootCatalog() catches UnsupportedClassVersionError 
> and provides a clear error message guiding the user to use 
> {{--camel-spring-boot-version=4.18.x}} for JDK 17 compatibility, or upgrade 
> to JDK 21+.
> - Tests skip Spring Boot runtime type on JDK < 21.
> *Note*: Reverting camel-spring-boot 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to