You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Guillaume Nodet (Jira)" <ji...@apache.org> on 2026/03/18 22:15:00 UTC
[jira] [Updated] (CAMEL-23213) ExportTest fails on JDK 17 after camel-spring-boot moved to Spring Boot 4 (JDK 21)
[ https://issues.apache.org/jira/browse/CAMEL-23213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet updated CAMEL-23213:
------------------------------------
Description:
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.
was:
The ExportTest in camel-jbang-core fails on JDK 17 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}
The camel-catalog-provider-springboot 4.19.0-SNAPSHOT artifact from the camel-spring-boot repo is compiled with Java 21 target (class file version 65.0), making it incompatible with JDK 17.
This is a *pre-existing, widespread issue* affecting multiple PRs whose incremental CI pulls in camel-jbang-core on JDK 17 runners. Confirmed on PRs for CAMEL-23209 (SMB), CAMEL-23212 (Docling), CAMEL-23210 (PQC), and others.
20 out of 66 ExportTest tests fail (all Spring Boot runtime type variants). JDK 21 and 25 are unaffected.
The fix needs to happen in the camel-spring-boot repo — either the catalog provider should be compiled with Java 17 target, or the ExportTest should handle the class version mismatch gracefully (e.g. skip Spring Boot tests when running on JDK 17).
Summary: ExportTest fails on JDK 17 after camel-spring-boot moved to Spring Boot 4 (JDK 21) (was: ExportTest fails on JDK 17 due to camel-catalog-provider-springboot compiled with Java 21 target)
> 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)